mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-3f0e0e18ca117418/out/
avssuas.rs

1#![doc = "MAVLink AVSSUAS dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 2u8;
23pub const DIALECT_NUMBER: u8 = 1u8;
24#[cfg_attr(feature = "ts", derive(TS))]
25#[cfg_attr(feature = "ts", ts(export))]
26#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28#[cfg_attr(feature = "serde", serde(tag = "type"))]
29#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30#[repr(u32)]
31#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
32pub enum ActuatorConfiguration {
33    #[doc = "Do nothing."]
34    ACTUATOR_CONFIGURATION_NONE = 0,
35    #[doc = "Command the actuator to beep now."]
36    ACTUATOR_CONFIGURATION_BEEP = 1,
37    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
38    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
39    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
41    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
42    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
45}
46impl ActuatorConfiguration {
47    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
48}
49impl Default for ActuatorConfiguration {
50    fn default() -> Self {
51        Self::DEFAULT
52    }
53}
54#[cfg_attr(feature = "ts", derive(TS))]
55#[cfg_attr(feature = "ts", ts(export))]
56#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
57#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
58#[cfg_attr(feature = "serde", serde(tag = "type"))]
59#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
60#[repr(u32)]
61#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
62pub enum ActuatorOutputFunction {
63    #[doc = "No function (disabled)."]
64    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
65    #[doc = "Motor 1"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
67    #[doc = "Motor 2"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
69    #[doc = "Motor 3"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
71    #[doc = "Motor 4"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
73    #[doc = "Motor 5"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
75    #[doc = "Motor 6"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
77    #[doc = "Motor 7"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
79    #[doc = "Motor 8"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
81    #[doc = "Motor 9"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
83    #[doc = "Motor 10"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
85    #[doc = "Motor 11"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
87    #[doc = "Motor 12"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
89    #[doc = "Motor 13"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
91    #[doc = "Motor 14"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
93    #[doc = "Motor 15"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
95    #[doc = "Motor 16"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
97    #[doc = "Servo 1"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
99    #[doc = "Servo 2"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
101    #[doc = "Servo 3"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
103    #[doc = "Servo 4"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
105    #[doc = "Servo 5"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
107    #[doc = "Servo 6"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
109    #[doc = "Servo 7"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
111    #[doc = "Servo 8"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
113    #[doc = "Servo 9"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
115    #[doc = "Servo 10"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
117    #[doc = "Servo 11"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
119    #[doc = "Servo 12"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
121    #[doc = "Servo 13"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
123    #[doc = "Servo 14"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
125    #[doc = "Servo 15"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
127    #[doc = "Servo 16"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
129}
130impl ActuatorOutputFunction {
131    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
132}
133impl Default for ActuatorOutputFunction {
134    fn default() -> Self {
135        Self::DEFAULT
136    }
137}
138#[cfg_attr(feature = "ts", derive(TS))]
139#[cfg_attr(feature = "ts", ts(export))]
140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
142#[cfg_attr(feature = "serde", serde(tag = "type"))]
143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
144#[repr(u32)]
145#[doc = "Enumeration of the ADSB altimeter types"]
146pub enum AdsbAltitudeType {
147    #[doc = "Altitude reported from a Baro source using QNH reference"]
148    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
149    #[doc = "Altitude reported from a GNSS source"]
150    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
151}
152impl AdsbAltitudeType {
153    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
154}
155impl Default for AdsbAltitudeType {
156    fn default() -> Self {
157        Self::DEFAULT
158    }
159}
160#[cfg_attr(feature = "ts", derive(TS))]
161#[cfg_attr(feature = "ts", ts(export))]
162#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
164#[cfg_attr(feature = "serde", serde(tag = "type"))]
165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
166#[repr(u32)]
167#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
168pub enum AdsbEmitterType {
169    ADSB_EMITTER_TYPE_NO_INFO = 0,
170    ADSB_EMITTER_TYPE_LIGHT = 1,
171    ADSB_EMITTER_TYPE_SMALL = 2,
172    ADSB_EMITTER_TYPE_LARGE = 3,
173    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
174    ADSB_EMITTER_TYPE_HEAVY = 5,
175    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
176    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
177    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
178    ADSB_EMITTER_TYPE_GLIDER = 9,
179    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
180    ADSB_EMITTER_TYPE_PARACHUTE = 11,
181    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
182    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
183    ADSB_EMITTER_TYPE_UAV = 14,
184    ADSB_EMITTER_TYPE_SPACE = 15,
185    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
186    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
187    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
188    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
189}
190impl AdsbEmitterType {
191    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
192}
193impl Default for AdsbEmitterType {
194    fn default() -> Self {
195        Self::DEFAULT
196    }
197}
198bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
199impl AdsbFlags {
200    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
201}
202impl Default for AdsbFlags {
203    fn default() -> Self {
204        Self::DEFAULT
205    }
206}
207bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
208impl AisFlags {
209    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
210}
211impl Default for AisFlags {
212    fn default() -> Self {
213        Self::DEFAULT
214    }
215}
216#[cfg_attr(feature = "ts", derive(TS))]
217#[cfg_attr(feature = "ts", ts(export))]
218#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
220#[cfg_attr(feature = "serde", serde(tag = "type"))]
221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
222#[repr(u32)]
223#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
224pub enum AisNavStatus {
225    #[doc = "Under way using engine."]
226    UNDER_WAY = 0,
227    AIS_NAV_ANCHORED = 1,
228    AIS_NAV_UN_COMMANDED = 2,
229    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
230    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
231    AIS_NAV_MOORED = 5,
232    AIS_NAV_AGROUND = 6,
233    AIS_NAV_FISHING = 7,
234    AIS_NAV_SAILING = 8,
235    AIS_NAV_RESERVED_HSC = 9,
236    AIS_NAV_RESERVED_WIG = 10,
237    AIS_NAV_RESERVED_1 = 11,
238    AIS_NAV_RESERVED_2 = 12,
239    AIS_NAV_RESERVED_3 = 13,
240    #[doc = "Search And Rescue Transponder."]
241    AIS_NAV_AIS_SART = 14,
242    #[doc = "Not available (default)."]
243    AIS_NAV_UNKNOWN = 15,
244}
245impl AisNavStatus {
246    pub const DEFAULT: Self = Self::UNDER_WAY;
247}
248impl Default for AisNavStatus {
249    fn default() -> Self {
250        Self::DEFAULT
251    }
252}
253#[cfg_attr(feature = "ts", derive(TS))]
254#[cfg_attr(feature = "ts", ts(export))]
255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
257#[cfg_attr(feature = "serde", serde(tag = "type"))]
258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
259#[repr(u32)]
260#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
261pub enum AisType {
262    #[doc = "Not available (default)."]
263    AIS_TYPE_UNKNOWN = 0,
264    AIS_TYPE_RESERVED_1 = 1,
265    AIS_TYPE_RESERVED_2 = 2,
266    AIS_TYPE_RESERVED_3 = 3,
267    AIS_TYPE_RESERVED_4 = 4,
268    AIS_TYPE_RESERVED_5 = 5,
269    AIS_TYPE_RESERVED_6 = 6,
270    AIS_TYPE_RESERVED_7 = 7,
271    AIS_TYPE_RESERVED_8 = 8,
272    AIS_TYPE_RESERVED_9 = 9,
273    AIS_TYPE_RESERVED_10 = 10,
274    AIS_TYPE_RESERVED_11 = 11,
275    AIS_TYPE_RESERVED_12 = 12,
276    AIS_TYPE_RESERVED_13 = 13,
277    AIS_TYPE_RESERVED_14 = 14,
278    AIS_TYPE_RESERVED_15 = 15,
279    AIS_TYPE_RESERVED_16 = 16,
280    AIS_TYPE_RESERVED_17 = 17,
281    AIS_TYPE_RESERVED_18 = 18,
282    AIS_TYPE_RESERVED_19 = 19,
283    #[doc = "Wing In Ground effect."]
284    AIS_TYPE_WIG = 20,
285    AIS_TYPE_WIG_HAZARDOUS_A = 21,
286    AIS_TYPE_WIG_HAZARDOUS_B = 22,
287    AIS_TYPE_WIG_HAZARDOUS_C = 23,
288    AIS_TYPE_WIG_HAZARDOUS_D = 24,
289    AIS_TYPE_WIG_RESERVED_1 = 25,
290    AIS_TYPE_WIG_RESERVED_2 = 26,
291    AIS_TYPE_WIG_RESERVED_3 = 27,
292    AIS_TYPE_WIG_RESERVED_4 = 28,
293    AIS_TYPE_WIG_RESERVED_5 = 29,
294    AIS_TYPE_FISHING = 30,
295    AIS_TYPE_TOWING = 31,
296    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
297    AIS_TYPE_TOWING_LARGE = 32,
298    #[doc = "Dredging or other underwater ops."]
299    AIS_TYPE_DREDGING = 33,
300    AIS_TYPE_DIVING = 34,
301    AIS_TYPE_MILITARY = 35,
302    AIS_TYPE_SAILING = 36,
303    AIS_TYPE_PLEASURE = 37,
304    AIS_TYPE_RESERVED_20 = 38,
305    AIS_TYPE_RESERVED_21 = 39,
306    #[doc = "High Speed Craft."]
307    AIS_TYPE_HSC = 40,
308    AIS_TYPE_HSC_HAZARDOUS_A = 41,
309    AIS_TYPE_HSC_HAZARDOUS_B = 42,
310    AIS_TYPE_HSC_HAZARDOUS_C = 43,
311    AIS_TYPE_HSC_HAZARDOUS_D = 44,
312    AIS_TYPE_HSC_RESERVED_1 = 45,
313    AIS_TYPE_HSC_RESERVED_2 = 46,
314    AIS_TYPE_HSC_RESERVED_3 = 47,
315    AIS_TYPE_HSC_RESERVED_4 = 48,
316    AIS_TYPE_HSC_UNKNOWN = 49,
317    AIS_TYPE_PILOT = 50,
318    #[doc = "Search And Rescue vessel."]
319    AIS_TYPE_SAR = 51,
320    AIS_TYPE_TUG = 52,
321    AIS_TYPE_PORT_TENDER = 53,
322    #[doc = "Anti-pollution equipment."]
323    AIS_TYPE_ANTI_POLLUTION = 54,
324    AIS_TYPE_LAW_ENFORCEMENT = 55,
325    AIS_TYPE_SPARE_LOCAL_1 = 56,
326    AIS_TYPE_SPARE_LOCAL_2 = 57,
327    AIS_TYPE_MEDICAL_TRANSPORT = 58,
328    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
329    AIS_TYPE_NONECOMBATANT = 59,
330    AIS_TYPE_PASSENGER = 60,
331    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
332    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
333    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
334    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
335    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
336    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
337    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
338    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
339    AIS_TYPE_PASSENGER_UNKNOWN = 69,
340    AIS_TYPE_CARGO = 70,
341    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
342    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
343    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
344    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
345    AIS_TYPE_CARGO_RESERVED_1 = 75,
346    AIS_TYPE_CARGO_RESERVED_2 = 76,
347    AIS_TYPE_CARGO_RESERVED_3 = 77,
348    AIS_TYPE_CARGO_RESERVED_4 = 78,
349    AIS_TYPE_CARGO_UNKNOWN = 79,
350    AIS_TYPE_TANKER = 80,
351    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
352    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
353    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
354    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
355    AIS_TYPE_TANKER_RESERVED_1 = 85,
356    AIS_TYPE_TANKER_RESERVED_2 = 86,
357    AIS_TYPE_TANKER_RESERVED_3 = 87,
358    AIS_TYPE_TANKER_RESERVED_4 = 88,
359    AIS_TYPE_TANKER_UNKNOWN = 89,
360    AIS_TYPE_OTHER = 90,
361    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
362    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
363    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
364    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
365    AIS_TYPE_OTHER_RESERVED_1 = 95,
366    AIS_TYPE_OTHER_RESERVED_2 = 96,
367    AIS_TYPE_OTHER_RESERVED_3 = 97,
368    AIS_TYPE_OTHER_RESERVED_4 = 98,
369    AIS_TYPE_OTHER_UNKNOWN = 99,
370}
371impl AisType {
372    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
373}
374impl Default for AisType {
375    fn default() -> Self {
376        Self::DEFAULT
377    }
378}
379bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
380impl AttitudeTargetTypemask {
381    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
382}
383impl Default for AttitudeTargetTypemask {
384    fn default() -> Self {
385        Self::DEFAULT
386    }
387}
388#[cfg_attr(feature = "ts", derive(TS))]
389#[cfg_attr(feature = "ts", ts(export))]
390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
392#[cfg_attr(feature = "serde", serde(tag = "type"))]
393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
394#[repr(u32)]
395#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
396pub enum AutotuneAxis {
397    #[doc = "Autotune roll axis."]
398    AUTOTUNE_AXIS_ROLL = 1,
399    #[doc = "Autotune pitch axis."]
400    AUTOTUNE_AXIS_PITCH = 2,
401    #[doc = "Autotune yaw axis."]
402    AUTOTUNE_AXIS_YAW = 4,
403}
404impl AutotuneAxis {
405    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
406}
407impl Default for AutotuneAxis {
408    fn default() -> Self {
409        Self::DEFAULT
410    }
411}
412#[cfg_attr(feature = "ts", derive(TS))]
413#[cfg_attr(feature = "ts", ts(export))]
414#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
416#[cfg_attr(feature = "serde", serde(tag = "type"))]
417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
418#[repr(u32)]
419pub enum AvssHorseflyOperationMode {
420    #[doc = "In manual control mode"]
421    MODE_HORSEFLY_MANUAL_CTRL = 0,
422    #[doc = "In auto takeoff mode"]
423    MODE_HORSEFLY_AUTO_TAKEOFF = 1,
424    #[doc = "In auto landing mode"]
425    MODE_HORSEFLY_AUTO_LANDING = 2,
426    #[doc = "In go home mode"]
427    MODE_HORSEFLY_NAVI_GO_HOME = 3,
428    #[doc = "In drop mode"]
429    MODE_HORSEFLY_DROP = 4,
430}
431impl AvssHorseflyOperationMode {
432    pub const DEFAULT: Self = Self::MODE_HORSEFLY_MANUAL_CTRL;
433}
434impl Default for AvssHorseflyOperationMode {
435    fn default() -> Self {
436        Self::DEFAULT
437    }
438}
439#[cfg_attr(feature = "ts", derive(TS))]
440#[cfg_attr(feature = "ts", ts(export))]
441#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
443#[cfg_attr(feature = "serde", serde(tag = "type"))]
444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
445#[repr(u32)]
446pub enum AvssM300OperationMode {
447    #[doc = "In manual control mode"]
448    MODE_M300_MANUAL_CTRL = 0,
449    #[doc = "In attitude mode"]
450    MODE_M300_ATTITUDE = 1,
451    #[doc = "In GPS mode"]
452    MODE_M300_P_GPS = 6,
453    #[doc = "In hotpoint mode"]
454    MODE_M300_HOTPOINT_MODE = 9,
455    #[doc = "In assisted takeoff mode"]
456    MODE_M300_ASSISTED_TAKEOFF = 10,
457    #[doc = "In auto takeoff mode"]
458    MODE_M300_AUTO_TAKEOFF = 11,
459    #[doc = "In auto landing mode"]
460    MODE_M300_AUTO_LANDING = 12,
461    #[doc = "In go home mode"]
462    MODE_M300_NAVI_GO_HOME = 15,
463    #[doc = "In sdk control mode"]
464    MODE_M300_NAVI_SDK_CTRL = 17,
465    #[doc = "In sport mode"]
466    MODE_M300_S_SPORT = 31,
467    #[doc = "In force auto landing mode"]
468    MODE_M300_FORCE_AUTO_LANDING = 33,
469    #[doc = "In tripod mode"]
470    MODE_M300_T_TRIPOD = 38,
471    #[doc = "In search mode"]
472    MODE_M300_SEARCH_MODE = 40,
473    #[doc = "In engine mode"]
474    MODE_M300_ENGINE_START = 41,
475}
476impl AvssM300OperationMode {
477    pub const DEFAULT: Self = Self::MODE_M300_MANUAL_CTRL;
478}
479impl Default for AvssM300OperationMode {
480    fn default() -> Self {
481        Self::DEFAULT
482    }
483}
484bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
485impl CameraCapFlags {
486    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
487}
488impl Default for CameraCapFlags {
489    fn default() -> Self {
490        Self::DEFAULT
491    }
492}
493#[cfg_attr(feature = "ts", derive(TS))]
494#[cfg_attr(feature = "ts", ts(export))]
495#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
497#[cfg_attr(feature = "serde", serde(tag = "type"))]
498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
499#[repr(u32)]
500#[doc = "Camera Modes."]
501pub enum CameraMode {
502    #[doc = "Camera is in image/photo capture mode."]
503    CAMERA_MODE_IMAGE = 0,
504    #[doc = "Camera is in video capture mode."]
505    CAMERA_MODE_VIDEO = 1,
506    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
507    CAMERA_MODE_IMAGE_SURVEY = 2,
508}
509impl CameraMode {
510    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
511}
512impl Default for CameraMode {
513    fn default() -> Self {
514        Self::DEFAULT
515    }
516}
517#[cfg_attr(feature = "ts", derive(TS))]
518#[cfg_attr(feature = "ts", ts(export))]
519#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
521#[cfg_attr(feature = "serde", serde(tag = "type"))]
522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
523#[repr(u32)]
524#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
525pub enum CameraSource {
526    #[doc = "Default camera source."]
527    CAMERA_SOURCE_DEFAULT = 0,
528    #[doc = "RGB camera source."]
529    CAMERA_SOURCE_RGB = 1,
530    #[doc = "IR camera source."]
531    CAMERA_SOURCE_IR = 2,
532    #[doc = "NDVI camera source."]
533    CAMERA_SOURCE_NDVI = 3,
534}
535impl CameraSource {
536    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
537}
538impl Default for CameraSource {
539    fn default() -> Self {
540        Self::DEFAULT
541    }
542}
543#[cfg_attr(feature = "ts", derive(TS))]
544#[cfg_attr(feature = "ts", ts(export))]
545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
547#[cfg_attr(feature = "serde", serde(tag = "type"))]
548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
549#[repr(u32)]
550#[doc = "Camera tracking modes"]
551pub enum CameraTrackingMode {
552    #[doc = "Not tracking"]
553    CAMERA_TRACKING_MODE_NONE = 0,
554    #[doc = "Target is a point"]
555    CAMERA_TRACKING_MODE_POINT = 1,
556    #[doc = "Target is a rectangle"]
557    CAMERA_TRACKING_MODE_RECTANGLE = 2,
558}
559impl CameraTrackingMode {
560    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
561}
562impl Default for CameraTrackingMode {
563    fn default() -> Self {
564        Self::DEFAULT
565    }
566}
567#[cfg_attr(feature = "ts", derive(TS))]
568#[cfg_attr(feature = "ts", ts(export))]
569#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
571#[cfg_attr(feature = "serde", serde(tag = "type"))]
572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
573#[repr(u32)]
574#[doc = "Camera tracking status flags"]
575pub enum CameraTrackingStatusFlags {
576    #[doc = "Camera is not tracking"]
577    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
578    #[doc = "Camera is tracking"]
579    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
580    #[doc = "Camera tracking in error state"]
581    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
582}
583impl CameraTrackingStatusFlags {
584    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
585}
586impl Default for CameraTrackingStatusFlags {
587    fn default() -> Self {
588        Self::DEFAULT
589    }
590}
591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
592impl CameraTrackingTargetData {
593    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
594}
595impl Default for CameraTrackingTargetData {
596    fn default() -> Self {
597        Self::DEFAULT
598    }
599}
600#[cfg_attr(feature = "ts", derive(TS))]
601#[cfg_attr(feature = "ts", ts(export))]
602#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
604#[cfg_attr(feature = "serde", serde(tag = "type"))]
605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
606#[repr(u32)]
607#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
608pub enum CameraZoomType {
609    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
610    ZOOM_TYPE_STEP = 0,
611    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
612    ZOOM_TYPE_CONTINUOUS = 1,
613    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
614    ZOOM_TYPE_RANGE = 2,
615    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
616    ZOOM_TYPE_FOCAL_LENGTH = 3,
617    #[doc = "Zoom value as horizontal field of view in degrees."]
618    ZOOM_TYPE_HORIZONTAL_FOV = 4,
619}
620impl CameraZoomType {
621    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
622}
623impl Default for CameraZoomType {
624    fn default() -> Self {
625        Self::DEFAULT
626    }
627}
628#[cfg_attr(feature = "ts", derive(TS))]
629#[cfg_attr(feature = "ts", ts(export))]
630#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
632#[cfg_attr(feature = "serde", serde(tag = "type"))]
633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
634#[repr(u32)]
635pub enum CanFilterOp {
636    CAN_FILTER_REPLACE = 0,
637    CAN_FILTER_ADD = 1,
638    CAN_FILTER_REMOVE = 2,
639}
640impl CanFilterOp {
641    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
642}
643impl Default for CanFilterOp {
644    fn default() -> Self {
645        Self::DEFAULT
646    }
647}
648#[cfg_attr(feature = "ts", derive(TS))]
649#[cfg_attr(feature = "ts", ts(export))]
650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
652#[cfg_attr(feature = "serde", serde(tag = "type"))]
653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
654#[repr(u32)]
655#[doc = "Possible responses from a CELLULAR_CONFIG message."]
656pub enum CellularConfigResponse {
657    #[doc = "Changes accepted."]
658    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
659    #[doc = "Invalid APN."]
660    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
661    #[doc = "Invalid PIN."]
662    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
663    #[doc = "Changes rejected."]
664    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
665    #[doc = "PUK is required to unblock SIM card."]
666    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
667}
668impl CellularConfigResponse {
669    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
670}
671impl Default for CellularConfigResponse {
672    fn default() -> Self {
673        Self::DEFAULT
674    }
675}
676#[cfg_attr(feature = "ts", derive(TS))]
677#[cfg_attr(feature = "ts", ts(export))]
678#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
680#[cfg_attr(feature = "serde", serde(tag = "type"))]
681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
682#[repr(u32)]
683#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
684pub enum CellularNetworkFailedReason {
685    #[doc = "No error"]
686    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
687    #[doc = "Error state is unknown"]
688    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
689    #[doc = "SIM is required for the modem but missing"]
690    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
691    #[doc = "SIM is available, but not usable for connection"]
692    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
693}
694impl CellularNetworkFailedReason {
695    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
696}
697impl Default for CellularNetworkFailedReason {
698    fn default() -> Self {
699        Self::DEFAULT
700    }
701}
702#[cfg_attr(feature = "ts", derive(TS))]
703#[cfg_attr(feature = "ts", ts(export))]
704#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
706#[cfg_attr(feature = "serde", serde(tag = "type"))]
707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
708#[repr(u32)]
709#[doc = "Cellular network radio type"]
710pub enum CellularNetworkRadioType {
711    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
712    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
713    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
714    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
715    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
716}
717impl CellularNetworkRadioType {
718    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
719}
720impl Default for CellularNetworkRadioType {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725#[cfg_attr(feature = "ts", derive(TS))]
726#[cfg_attr(feature = "ts", ts(export))]
727#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
729#[cfg_attr(feature = "serde", serde(tag = "type"))]
730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
731#[repr(u32)]
732#[doc = "These flags encode the cellular network status"]
733pub enum CellularStatusFlag {
734    #[doc = "State unknown or not reportable."]
735    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
736    #[doc = "Modem is unusable"]
737    CELLULAR_STATUS_FLAG_FAILED = 1,
738    #[doc = "Modem is being initialized"]
739    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
740    #[doc = "Modem is locked"]
741    CELLULAR_STATUS_FLAG_LOCKED = 3,
742    #[doc = "Modem is not enabled and is powered down"]
743    CELLULAR_STATUS_FLAG_DISABLED = 4,
744    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
745    CELLULAR_STATUS_FLAG_DISABLING = 5,
746    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
747    CELLULAR_STATUS_FLAG_ENABLING = 6,
748    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
749    CELLULAR_STATUS_FLAG_ENABLED = 7,
750    #[doc = "Modem is searching for a network provider to register"]
751    CELLULAR_STATUS_FLAG_SEARCHING = 8,
752    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
753    CELLULAR_STATUS_FLAG_REGISTERED = 9,
754    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
755    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
756    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
757    CELLULAR_STATUS_FLAG_CONNECTING = 11,
758    #[doc = "One or more packet data bearers is active and connected"]
759    CELLULAR_STATUS_FLAG_CONNECTED = 12,
760}
761impl CellularStatusFlag {
762    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
763}
764impl Default for CellularStatusFlag {
765    fn default() -> Self {
766        Self::DEFAULT
767    }
768}
769#[cfg_attr(feature = "ts", derive(TS))]
770#[cfg_attr(feature = "ts", ts(export))]
771#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
773#[cfg_attr(feature = "serde", serde(tag = "type"))]
774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
775#[repr(u32)]
776#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
777pub enum CompMetadataType {
778    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
779    COMP_METADATA_TYPE_GENERAL = 0,
780    #[doc = "Parameter meta data."]
781    COMP_METADATA_TYPE_PARAMETER = 1,
782    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
783    COMP_METADATA_TYPE_COMMANDS = 2,
784    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
785    COMP_METADATA_TYPE_PERIPHERALS = 3,
786    #[doc = "Meta data for the events interface."]
787    COMP_METADATA_TYPE_EVENTS = 4,
788    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
789    COMP_METADATA_TYPE_ACTUATORS = 5,
790}
791impl CompMetadataType {
792    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
793}
794impl Default for CompMetadataType {
795    fn default() -> Self {
796        Self::DEFAULT
797    }
798}
799#[cfg_attr(feature = "ts", derive(TS))]
800#[cfg_attr(feature = "ts", ts(export))]
801#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
803#[cfg_attr(feature = "serde", serde(tag = "type"))]
804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
805#[repr(u32)]
806#[doc = "Indicates the ESC connection type."]
807pub enum EscConnectionType {
808    #[doc = "Traditional PPM ESC."]
809    ESC_CONNECTION_TYPE_PPM = 0,
810    #[doc = "Serial Bus connected ESC."]
811    ESC_CONNECTION_TYPE_SERIAL = 1,
812    #[doc = "One Shot PPM ESC."]
813    ESC_CONNECTION_TYPE_ONESHOT = 2,
814    #[doc = "I2C ESC."]
815    ESC_CONNECTION_TYPE_I2C = 3,
816    #[doc = "CAN-Bus ESC."]
817    ESC_CONNECTION_TYPE_CAN = 4,
818    #[doc = "DShot ESC."]
819    ESC_CONNECTION_TYPE_DSHOT = 5,
820}
821impl EscConnectionType {
822    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
823}
824impl Default for EscConnectionType {
825    fn default() -> Self {
826        Self::DEFAULT
827    }
828}
829bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
830impl EscFailureFlags {
831    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
832}
833impl Default for EscFailureFlags {
834    fn default() -> Self {
835        Self::DEFAULT
836    }
837}
838bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
839impl EstimatorStatusFlags {
840    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
841}
842impl Default for EstimatorStatusFlags {
843    fn default() -> Self {
844        Self::DEFAULT
845    }
846}
847#[cfg_attr(feature = "ts", derive(TS))]
848#[cfg_attr(feature = "ts", ts(export))]
849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
851#[cfg_attr(feature = "serde", serde(tag = "type"))]
852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
853#[repr(u32)]
854#[doc = "List of possible failure type to inject."]
855pub enum FailureType {
856    #[doc = "No failure injected, used to reset a previous failure."]
857    FAILURE_TYPE_OK = 0,
858    #[doc = "Sets unit off, so completely non-responsive."]
859    FAILURE_TYPE_OFF = 1,
860    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
861    FAILURE_TYPE_STUCK = 2,
862    #[doc = "Unit is reporting complete garbage."]
863    FAILURE_TYPE_GARBAGE = 3,
864    #[doc = "Unit is consistently wrong."]
865    FAILURE_TYPE_WRONG = 4,
866    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
867    FAILURE_TYPE_SLOW = 5,
868    #[doc = "Data of unit is delayed in time."]
869    FAILURE_TYPE_DELAYED = 6,
870    #[doc = "Unit is sometimes working, sometimes not."]
871    FAILURE_TYPE_INTERMITTENT = 7,
872}
873impl FailureType {
874    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
875}
876impl Default for FailureType {
877    fn default() -> Self {
878        Self::DEFAULT
879    }
880}
881#[cfg_attr(feature = "ts", derive(TS))]
882#[cfg_attr(feature = "ts", ts(export))]
883#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
884#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
885#[cfg_attr(feature = "serde", serde(tag = "type"))]
886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
887#[repr(u32)]
888#[doc = "List of possible units where failures can be injected."]
889pub enum FailureUnit {
890    FAILURE_UNIT_SENSOR_GYRO = 0,
891    FAILURE_UNIT_SENSOR_ACCEL = 1,
892    FAILURE_UNIT_SENSOR_MAG = 2,
893    FAILURE_UNIT_SENSOR_BARO = 3,
894    FAILURE_UNIT_SENSOR_GPS = 4,
895    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
896    FAILURE_UNIT_SENSOR_VIO = 6,
897    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
898    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
899    FAILURE_UNIT_SYSTEM_BATTERY = 100,
900    FAILURE_UNIT_SYSTEM_MOTOR = 101,
901    FAILURE_UNIT_SYSTEM_SERVO = 102,
902    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
903    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
904    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
905}
906impl FailureUnit {
907    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
908}
909impl Default for FailureUnit {
910    fn default() -> Self {
911        Self::DEFAULT
912    }
913}
914#[cfg_attr(feature = "ts", derive(TS))]
915#[cfg_attr(feature = "ts", ts(export))]
916#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
918#[cfg_attr(feature = "serde", serde(tag = "type"))]
919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
920#[repr(u32)]
921pub enum FenceBreach {
922    #[doc = "No last fence breach"]
923    FENCE_BREACH_NONE = 0,
924    #[doc = "Breached minimum altitude"]
925    FENCE_BREACH_MINALT = 1,
926    #[doc = "Breached maximum altitude"]
927    FENCE_BREACH_MAXALT = 2,
928    #[doc = "Breached fence boundary"]
929    FENCE_BREACH_BOUNDARY = 3,
930}
931impl FenceBreach {
932    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
933}
934impl Default for FenceBreach {
935    fn default() -> Self {
936        Self::DEFAULT
937    }
938}
939#[cfg_attr(feature = "ts", derive(TS))]
940#[cfg_attr(feature = "ts", ts(export))]
941#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
943#[cfg_attr(feature = "serde", serde(tag = "type"))]
944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
945#[repr(u32)]
946#[doc = "Actions being taken to mitigate/prevent fence breach"]
947pub enum FenceMitigate {
948    #[doc = "Unknown"]
949    FENCE_MITIGATE_UNKNOWN = 0,
950    #[doc = "No actions being taken"]
951    FENCE_MITIGATE_NONE = 1,
952    #[doc = "Velocity limiting active to prevent breach"]
953    FENCE_MITIGATE_VEL_LIMIT = 2,
954}
955impl FenceMitigate {
956    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
957}
958impl Default for FenceMitigate {
959    fn default() -> Self {
960        Self::DEFAULT
961    }
962}
963#[cfg_attr(feature = "ts", derive(TS))]
964#[cfg_attr(feature = "ts", ts(export))]
965#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
967#[cfg_attr(feature = "serde", serde(tag = "type"))]
968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
969#[repr(u32)]
970#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
971pub enum FenceType {
972    #[doc = "Maximum altitude fence"]
973    FENCE_TYPE_ALT_MAX = 1,
974    #[doc = "Circle fence"]
975    FENCE_TYPE_CIRCLE = 2,
976    #[doc = "Polygon fence"]
977    FENCE_TYPE_POLYGON = 4,
978    #[doc = "Minimum altitude fence"]
979    FENCE_TYPE_ALT_MIN = 8,
980}
981impl FenceType {
982    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
983}
984impl Default for FenceType {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
997pub enum FirmwareVersionType {
998    #[doc = "development release"]
999    FIRMWARE_VERSION_TYPE_DEV = 0,
1000    #[doc = "alpha release"]
1001    FIRMWARE_VERSION_TYPE_ALPHA = 64,
1002    #[doc = "beta release"]
1003    FIRMWARE_VERSION_TYPE_BETA = 128,
1004    #[doc = "release candidate"]
1005    FIRMWARE_VERSION_TYPE_RC = 192,
1006    #[doc = "official stable release"]
1007    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
1008}
1009impl FirmwareVersionType {
1010    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
1011}
1012impl Default for FirmwareVersionType {
1013    fn default() -> Self {
1014        Self::DEFAULT
1015    }
1016}
1017bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
1018impl GimbalDeviceCapFlags {
1019    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
1020}
1021impl Default for GimbalDeviceCapFlags {
1022    fn default() -> Self {
1023        Self::DEFAULT
1024    }
1025}
1026bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
1027impl GimbalDeviceErrorFlags {
1028    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
1029}
1030impl Default for GimbalDeviceErrorFlags {
1031    fn default() -> Self {
1032        Self::DEFAULT
1033    }
1034}
1035bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
1036impl GimbalDeviceFlags {
1037    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
1038}
1039impl Default for GimbalDeviceFlags {
1040    fn default() -> Self {
1041        Self::DEFAULT
1042    }
1043}
1044bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
1045impl GimbalManagerCapFlags {
1046    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
1047}
1048impl Default for GimbalManagerCapFlags {
1049    fn default() -> Self {
1050        Self::DEFAULT
1051    }
1052}
1053bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1054impl GimbalManagerFlags {
1055    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1056}
1057impl Default for GimbalManagerFlags {
1058    fn default() -> Self {
1059        Self::DEFAULT
1060    }
1061}
1062#[cfg_attr(feature = "ts", derive(TS))]
1063#[cfg_attr(feature = "ts", ts(export))]
1064#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1066#[cfg_attr(feature = "serde", serde(tag = "type"))]
1067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1068#[repr(u32)]
1069#[doc = "Type of GPS fix"]
1070pub enum GpsFixType {
1071    #[doc = "No GPS connected"]
1072    GPS_FIX_TYPE_NO_GPS = 0,
1073    #[doc = "No position information, GPS is connected"]
1074    GPS_FIX_TYPE_NO_FIX = 1,
1075    #[doc = "2D position"]
1076    GPS_FIX_TYPE_2D_FIX = 2,
1077    #[doc = "3D position"]
1078    GPS_FIX_TYPE_3D_FIX = 3,
1079    #[doc = "DGPS/SBAS aided 3D position"]
1080    GPS_FIX_TYPE_DGPS = 4,
1081    #[doc = "RTK float, 3D position"]
1082    GPS_FIX_TYPE_RTK_FLOAT = 5,
1083    #[doc = "RTK Fixed, 3D position"]
1084    GPS_FIX_TYPE_RTK_FIXED = 6,
1085    #[doc = "Static fixed, typically used for base stations"]
1086    GPS_FIX_TYPE_STATIC = 7,
1087    #[doc = "PPP, 3D position."]
1088    GPS_FIX_TYPE_PPP = 8,
1089}
1090impl GpsFixType {
1091    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1092}
1093impl Default for GpsFixType {
1094    fn default() -> Self {
1095        Self::DEFAULT
1096    }
1097}
1098bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1099impl GpsInputIgnoreFlags {
1100    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1101}
1102impl Default for GpsInputIgnoreFlags {
1103    fn default() -> Self {
1104        Self::DEFAULT
1105    }
1106}
1107#[cfg_attr(feature = "ts", derive(TS))]
1108#[cfg_attr(feature = "ts", ts(export))]
1109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1111#[cfg_attr(feature = "serde", serde(tag = "type"))]
1112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1113#[repr(u32)]
1114#[doc = "Gripper actions."]
1115pub enum GripperActions {
1116    #[doc = "Gripper release cargo."]
1117    GRIPPER_ACTION_RELEASE = 0,
1118    #[doc = "Gripper grab onto cargo."]
1119    GRIPPER_ACTION_GRAB = 1,
1120}
1121impl GripperActions {
1122    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1123}
1124impl Default for GripperActions {
1125    fn default() -> Self {
1126        Self::DEFAULT
1127    }
1128}
1129bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1130impl HighresImuUpdatedFlags {
1131    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1132}
1133impl Default for HighresImuUpdatedFlags {
1134    fn default() -> Self {
1135        Self::DEFAULT
1136    }
1137}
1138bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1139impl HilActuatorControlsFlags {
1140    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1141}
1142impl Default for HilActuatorControlsFlags {
1143    fn default() -> Self {
1144        Self::DEFAULT
1145    }
1146}
1147bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1148impl HilSensorUpdatedFlags {
1149    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1150}
1151impl Default for HilSensorUpdatedFlags {
1152    fn default() -> Self {
1153        Self::DEFAULT
1154    }
1155}
1156bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1157impl HlFailureFlag {
1158    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1159}
1160impl Default for HlFailureFlag {
1161    fn default() -> Self {
1162        Self::DEFAULT
1163    }
1164}
1165bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1166impl IlluminatorErrorFlags {
1167    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1168}
1169impl Default for IlluminatorErrorFlags {
1170    fn default() -> Self {
1171        Self::DEFAULT
1172    }
1173}
1174#[cfg_attr(feature = "ts", derive(TS))]
1175#[cfg_attr(feature = "ts", ts(export))]
1176#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1178#[cfg_attr(feature = "serde", serde(tag = "type"))]
1179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1180#[repr(u32)]
1181#[doc = "Modes of illuminator"]
1182pub enum IlluminatorMode {
1183    #[doc = "Illuminator mode is not specified/unknown"]
1184    ILLUMINATOR_MODE_UNKNOWN = 0,
1185    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1186    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1187    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1188    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1189}
1190impl IlluminatorMode {
1191    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1192}
1193impl Default for IlluminatorMode {
1194    fn default() -> Self {
1195        Self::DEFAULT
1196    }
1197}
1198#[cfg_attr(feature = "ts", derive(TS))]
1199#[cfg_attr(feature = "ts", ts(export))]
1200#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1202#[cfg_attr(feature = "serde", serde(tag = "type"))]
1203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1204#[repr(u32)]
1205#[doc = "Type of landing target"]
1206pub enum LandingTargetType {
1207    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1208    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1209    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1210    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1211    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1212    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1213    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1214    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1215}
1216impl LandingTargetType {
1217    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1218}
1219impl Default for LandingTargetType {
1220    fn default() -> Self {
1221        Self::DEFAULT
1222    }
1223}
1224#[cfg_attr(feature = "ts", derive(TS))]
1225#[cfg_attr(feature = "ts", ts(export))]
1226#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1228#[cfg_attr(feature = "serde", serde(tag = "type"))]
1229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1230#[repr(u32)]
1231pub enum MagCalStatus {
1232    MAG_CAL_NOT_STARTED = 0,
1233    MAG_CAL_WAITING_TO_START = 1,
1234    MAG_CAL_RUNNING_STEP_ONE = 2,
1235    MAG_CAL_RUNNING_STEP_TWO = 3,
1236    MAG_CAL_SUCCESS = 4,
1237    MAG_CAL_FAILED = 5,
1238    MAG_CAL_BAD_ORIENTATION = 6,
1239    MAG_CAL_BAD_RADIUS = 7,
1240}
1241impl MagCalStatus {
1242    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1243}
1244impl Default for MagCalStatus {
1245    fn default() -> Self {
1246        Self::DEFAULT
1247    }
1248}
1249#[cfg_attr(feature = "ts", derive(TS))]
1250#[cfg_attr(feature = "ts", ts(export))]
1251#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1253#[cfg_attr(feature = "serde", serde(tag = "type"))]
1254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1255#[repr(u32)]
1256pub enum MavArmAuthDeniedReason {
1257    #[doc = "Not a specific reason"]
1258    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1259    #[doc = "Authorizer will send the error as string to GCS"]
1260    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1261    #[doc = "At least one waypoint have a invalid value"]
1262    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1263    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1264    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1265    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1266    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1267    #[doc = "Weather is not good to fly"]
1268    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1269}
1270impl MavArmAuthDeniedReason {
1271    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1272}
1273impl Default for MavArmAuthDeniedReason {
1274    fn default() -> Self {
1275        Self::DEFAULT
1276    }
1277}
1278#[cfg_attr(feature = "ts", derive(TS))]
1279#[cfg_attr(feature = "ts", ts(export))]
1280#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1282#[cfg_attr(feature = "serde", serde(tag = "type"))]
1283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1284#[repr(u32)]
1285#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1286pub enum MavAutopilot {
1287    #[doc = "Generic autopilot, full support for everything"]
1288    MAV_AUTOPILOT_GENERIC = 0,
1289    #[doc = "Reserved for future use."]
1290    MAV_AUTOPILOT_RESERVED = 1,
1291    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1292    MAV_AUTOPILOT_SLUGS = 2,
1293    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1294    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1295    #[doc = "OpenPilot, <http://openpilot.org>"]
1296    MAV_AUTOPILOT_OPENPILOT = 4,
1297    #[doc = "Generic autopilot only supporting simple waypoints"]
1298    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1299    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1300    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1301    #[doc = "Generic autopilot supporting the full mission command set"]
1302    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1303    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1304    MAV_AUTOPILOT_INVALID = 8,
1305    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1306    MAV_AUTOPILOT_PPZ = 9,
1307    #[doc = "UAV Dev Board"]
1308    MAV_AUTOPILOT_UDB = 10,
1309    #[doc = "FlexiPilot"]
1310    MAV_AUTOPILOT_FP = 11,
1311    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1312    MAV_AUTOPILOT_PX4 = 12,
1313    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1314    MAV_AUTOPILOT_SMACCMPILOT = 13,
1315    #[doc = "AutoQuad -- <http://autoquad.org>"]
1316    MAV_AUTOPILOT_AUTOQUAD = 14,
1317    #[doc = "Armazila -- <http://armazila.com>"]
1318    MAV_AUTOPILOT_ARMAZILA = 15,
1319    #[doc = "Aerob -- <http://aerob.ru>"]
1320    MAV_AUTOPILOT_AEROB = 16,
1321    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1322    MAV_AUTOPILOT_ASLUAV = 17,
1323    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1324    MAV_AUTOPILOT_SMARTAP = 18,
1325    #[doc = "AirRails - <http://uaventure.com>"]
1326    MAV_AUTOPILOT_AIRRAILS = 19,
1327    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1328    MAV_AUTOPILOT_REFLEX = 20,
1329}
1330impl MavAutopilot {
1331    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1332}
1333impl Default for MavAutopilot {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345pub enum MavAvssCommandFailureReason {
1346    #[doc = "AVSS defined command failure reason. PRS not steady."]
1347    PRS_NOT_STEADY = 1,
1348    #[doc = "AVSS defined command failure reason. PRS DTM not armed."]
1349    PRS_DTM_NOT_ARMED = 2,
1350    #[doc = "AVSS defined command failure reason. PRS OTM not armed."]
1351    PRS_OTM_NOT_ARMED = 3,
1352}
1353impl MavAvssCommandFailureReason {
1354    pub const DEFAULT: Self = Self::PRS_NOT_STEADY;
1355}
1356impl Default for MavAvssCommandFailureReason {
1357    fn default() -> Self {
1358        Self::DEFAULT
1359    }
1360}
1361#[cfg_attr(feature = "ts", derive(TS))]
1362#[cfg_attr(feature = "ts", ts(export))]
1363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1365#[cfg_attr(feature = "serde", serde(tag = "type"))]
1366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1367#[repr(u32)]
1368#[doc = "Enumeration for battery charge states."]
1369pub enum MavBatteryChargeState {
1370    #[doc = "Low battery state is not provided"]
1371    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1372    #[doc = "Battery is not in low state. Normal operation."]
1373    MAV_BATTERY_CHARGE_STATE_OK = 1,
1374    #[doc = "Battery state is low, warn and monitor close."]
1375    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1376    #[doc = "Battery state is critical, return or abort immediately."]
1377    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1378    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1379    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1380    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1381    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1382    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1383    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1384    #[doc = "Battery is charging."]
1385    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1386}
1387impl MavBatteryChargeState {
1388    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1389}
1390impl Default for MavBatteryChargeState {
1391    fn default() -> Self {
1392        Self::DEFAULT
1393    }
1394}
1395bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1396impl MavBatteryFault {
1397    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1398}
1399impl Default for MavBatteryFault {
1400    fn default() -> Self {
1401        Self::DEFAULT
1402    }
1403}
1404#[cfg_attr(feature = "ts", derive(TS))]
1405#[cfg_attr(feature = "ts", ts(export))]
1406#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1408#[cfg_attr(feature = "serde", serde(tag = "type"))]
1409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1410#[repr(u32)]
1411#[doc = "Enumeration of battery functions"]
1412pub enum MavBatteryFunction {
1413    #[doc = "Battery function is unknown"]
1414    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1415    #[doc = "Battery supports all flight systems"]
1416    MAV_BATTERY_FUNCTION_ALL = 1,
1417    #[doc = "Battery for the propulsion system"]
1418    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1419    #[doc = "Avionics battery"]
1420    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1421    #[doc = "Payload battery"]
1422    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1423}
1424impl MavBatteryFunction {
1425    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1426}
1427impl Default for MavBatteryFunction {
1428    fn default() -> Self {
1429        Self::DEFAULT
1430    }
1431}
1432#[cfg_attr(feature = "ts", derive(TS))]
1433#[cfg_attr(feature = "ts", ts(export))]
1434#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1436#[cfg_attr(feature = "serde", serde(tag = "type"))]
1437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1438#[repr(u32)]
1439#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1440pub enum MavBatteryMode {
1441    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1442    MAV_BATTERY_MODE_UNKNOWN = 0,
1443    #[doc = "Battery is auto discharging (towards storage level)."]
1444    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1445    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1446    MAV_BATTERY_MODE_HOT_SWAP = 2,
1447}
1448impl MavBatteryMode {
1449    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1450}
1451impl Default for MavBatteryMode {
1452    fn default() -> Self {
1453        Self::DEFAULT
1454    }
1455}
1456#[cfg_attr(feature = "ts", derive(TS))]
1457#[cfg_attr(feature = "ts", ts(export))]
1458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1460#[cfg_attr(feature = "serde", serde(tag = "type"))]
1461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1462#[repr(u32)]
1463#[doc = "Enumeration of battery types"]
1464pub enum MavBatteryType {
1465    #[doc = "Not specified."]
1466    MAV_BATTERY_TYPE_UNKNOWN = 0,
1467    #[doc = "Lithium polymer battery"]
1468    MAV_BATTERY_TYPE_LIPO = 1,
1469    #[doc = "Lithium-iron-phosphate battery"]
1470    MAV_BATTERY_TYPE_LIFE = 2,
1471    #[doc = "Lithium-ION battery"]
1472    MAV_BATTERY_TYPE_LION = 3,
1473    #[doc = "Nickel metal hydride battery"]
1474    MAV_BATTERY_TYPE_NIMH = 4,
1475}
1476impl MavBatteryType {
1477    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1478}
1479impl Default for MavBatteryType {
1480    fn default() -> Self {
1481        Self::DEFAULT
1482    }
1483}
1484#[cfg_attr(feature = "ts", derive(TS))]
1485#[cfg_attr(feature = "ts", ts(export))]
1486#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1488#[cfg_attr(feature = "serde", serde(tag = "type"))]
1489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1490#[repr(u32)]
1491#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1492pub enum MavCmd {
1493    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1494    MAV_CMD_NAV_WAYPOINT = 16,
1495    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1496    MAV_CMD_NAV_LOITER_UNLIM = 17,
1497    #[doc = "Loiter around this waypoint for X turns"]
1498    MAV_CMD_NAV_LOITER_TURNS = 18,
1499    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1500    MAV_CMD_NAV_LOITER_TIME = 19,
1501    #[doc = "Return to launch location"]
1502    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1503    #[doc = "Land at location."]
1504    MAV_CMD_NAV_LAND = 21,
1505    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1506    MAV_CMD_NAV_TAKEOFF = 22,
1507    #[doc = "Land at local position (local frame only)"]
1508    MAV_CMD_NAV_LAND_LOCAL = 23,
1509    #[doc = "Takeoff from local position (local frame only)"]
1510    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1511    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1512    MAV_CMD_NAV_FOLLOW = 25,
1513    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1514    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1515    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1516    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1517    #[doc = "Begin following a target"]
1518    MAV_CMD_DO_FOLLOW = 32,
1519    #[doc = "Reposition the MAV after a follow target command has been sent"]
1520    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1521    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1522    MAV_CMD_DO_ORBIT = 34,
1523    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1524    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1525    MAV_CMD_NAV_ROI = 80,
1526    #[doc = "Control autonomous path planning on the MAV."]
1527    MAV_CMD_NAV_PATHPLANNING = 81,
1528    #[doc = "Navigate to waypoint using a spline path."]
1529    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1530    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1531    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1532    #[doc = "Land using VTOL mode"]
1533    MAV_CMD_NAV_VTOL_LAND = 85,
1534    #[doc = "hand control over to an external controller"]
1535    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1536    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1537    MAV_CMD_NAV_DELAY = 93,
1538    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1539    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1540    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1541    MAV_CMD_NAV_LAST = 95,
1542    #[doc = "Delay mission state machine."]
1543    MAV_CMD_CONDITION_DELAY = 112,
1544    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1545    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1546    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1547    MAV_CMD_CONDITION_DISTANCE = 114,
1548    #[doc = "Reach a certain target angle."]
1549    MAV_CMD_CONDITION_YAW = 115,
1550    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1551    MAV_CMD_CONDITION_LAST = 159,
1552    #[doc = "Set system mode."]
1553    MAV_CMD_DO_SET_MODE = 176,
1554    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1555    MAV_CMD_DO_JUMP = 177,
1556    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1557    MAV_CMD_DO_CHANGE_SPEED = 178,
1558    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1559    MAV_CMD_DO_SET_HOME = 179,
1560    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1561    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1562    MAV_CMD_DO_SET_PARAMETER = 180,
1563    #[doc = "Set a relay to a condition."]
1564    MAV_CMD_DO_SET_RELAY = 181,
1565    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1566    MAV_CMD_DO_REPEAT_RELAY = 182,
1567    #[doc = "Set a servo to a desired PWM value."]
1568    MAV_CMD_DO_SET_SERVO = 183,
1569    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1570    MAV_CMD_DO_REPEAT_SERVO = 184,
1571    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1572    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1573    #[doc = "Change altitude set point."]
1574    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1575    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1576    MAV_CMD_DO_SET_ACTUATOR = 187,
1577    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1578    MAV_CMD_DO_RETURN_PATH_START = 188,
1579    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1580    MAV_CMD_DO_LAND_START = 189,
1581    #[doc = "Mission command to perform a landing from a rally point."]
1582    MAV_CMD_DO_RALLY_LAND = 190,
1583    #[doc = "Mission command to safely abort an autonomous landing."]
1584    MAV_CMD_DO_GO_AROUND = 191,
1585    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1586    MAV_CMD_DO_REPOSITION = 192,
1587    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1588    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1589    #[doc = "Set moving direction to forward or reverse."]
1590    MAV_CMD_DO_SET_REVERSE = 194,
1591    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1592    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1593    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1594    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1595    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1596    MAV_CMD_DO_SET_ROI_NONE = 197,
1597    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1598    MAV_CMD_DO_SET_ROI_SYSID = 198,
1599    #[doc = "Control onboard camera system."]
1600    MAV_CMD_DO_CONTROL_VIDEO = 200,
1601    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1602    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1603    MAV_CMD_DO_SET_ROI = 201,
1604    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1605    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1606    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1607    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1608    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1609    #[doc = "Mission command to configure a camera or antenna mount"]
1610    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1611    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1612    #[doc = "Mission command to control a camera or antenna mount"]
1613    MAV_CMD_DO_MOUNT_CONTROL = 205,
1614    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1615    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1616    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1617    MAV_CMD_DO_FENCE_ENABLE = 207,
1618    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1619    MAV_CMD_DO_PARACHUTE = 208,
1620    #[doc = "Command to perform motor test."]
1621    MAV_CMD_DO_MOTOR_TEST = 209,
1622    #[doc = "Change to/from inverted flight."]
1623    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1624    #[doc = "Mission command to operate a gripper."]
1625    MAV_CMD_DO_GRIPPER = 211,
1626    #[doc = "Enable/disable autotune."]
1627    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1628    #[doc = "Sets a desired vehicle turn angle and speed change."]
1629    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1630    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1631    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1632    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1633    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1634    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1635    #[doc = "set id of master controller"]
1636    MAV_CMD_DO_GUIDED_MASTER = 221,
1637    #[doc = "Set limits for external control"]
1638    MAV_CMD_DO_GUIDED_LIMITS = 222,
1639    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1640    MAV_CMD_DO_ENGINE_CONTROL = 223,
1641    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1642    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1643    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1644    MAV_CMD_DO_LAST = 240,
1645    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1646    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1647    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1648    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1649    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1650    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1651    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1652    MAV_CMD_PREFLIGHT_STORAGE = 245,
1653    #[doc = "Request the reboot or shutdown of system components."]
1654    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1655    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1656    MAV_CMD_OVERRIDE_GOTO = 252,
1657    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1658    MAV_CMD_OBLIQUE_SURVEY = 260,
1659    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1660    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1661    #[doc = "start running a mission"]
1662    MAV_CMD_MISSION_START = 300,
1663    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1664    MAV_CMD_ACTUATOR_TEST = 310,
1665    #[doc = "Actuator configuration command."]
1666    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1667    #[doc = "Arms / Disarms a component"]
1668    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1669    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1670    MAV_CMD_RUN_PREARM_CHECKS = 401,
1671    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1672    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1673    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1674    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1675    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1676    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1677    MAV_CMD_GET_HOME_POSITION = 410,
1678    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1679    MAV_CMD_INJECT_FAILURE = 420,
1680    #[doc = "Starts receiver pairing."]
1681    MAV_CMD_START_RX_PAIR = 500,
1682    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1683    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1684    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1685    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1686    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1687    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1688    MAV_CMD_REQUEST_MESSAGE = 512,
1689    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1690    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1691    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1692    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1693    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1694    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1695    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1696    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1697    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1698    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1699    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1700    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1701    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1702    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1703    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1704    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1705    MAV_CMD_STORAGE_FORMAT = 526,
1706    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1707    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1708    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1709    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1710    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1711    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1712    #[doc = "Reset all camera settings to Factory Default"]
1713    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1714    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1715    MAV_CMD_SET_CAMERA_MODE = 530,
1716    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1717    MAV_CMD_SET_CAMERA_ZOOM = 531,
1718    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1719    MAV_CMD_SET_CAMERA_FOCUS = 532,
1720    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1721    MAV_CMD_SET_STORAGE_USAGE = 533,
1722    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1723    MAV_CMD_SET_CAMERA_SOURCE = 534,
1724    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1725    MAV_CMD_JUMP_TAG = 600,
1726    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1727    MAV_CMD_DO_JUMP_TAG = 601,
1728    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1729    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1730    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1731    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1732    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1733    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1734    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1735    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1736    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1737    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1738    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1739    #[doc = "Enable or disable on-board camera triggering system."]
1740    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1741    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1742    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1743    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1744    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1745    #[doc = "Stops ongoing tracking."]
1746    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1747    #[doc = "Starts video capture (recording)."]
1748    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1749    #[doc = "Stop the current video capture (recording)."]
1750    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1751    #[doc = "Start video streaming"]
1752    MAV_CMD_VIDEO_START_STREAMING = 2502,
1753    #[doc = "Stop the given video stream"]
1754    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1755    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1756    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1757    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1758    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1759    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1760    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1761    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1762    MAV_CMD_LOGGING_START = 2510,
1763    #[doc = "Request to stop streaming log data over MAVLink"]
1764    MAV_CMD_LOGGING_STOP = 2511,
1765    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1766    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1767    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1768    #[doc = "Create a panorama at the current position"]
1769    MAV_CMD_PANORAMA_CREATE = 2800,
1770    #[doc = "Request VTOL transition"]
1771    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1772    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1773    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1774    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1775    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1776    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1777    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1778    #[doc = "Delay mission state machine until gate has been reached."]
1779    MAV_CMD_CONDITION_GATE = 4501,
1780    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1781    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1782    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1783    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1784    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1785    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1786    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1787    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1788    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1789    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1790    #[doc = "Rally point. You can have multiple rally points defined."]
1791    MAV_CMD_NAV_RALLY_POINT = 5100,
1792    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1793    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1794    #[doc = "Change state of safety switch."]
1795    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1796    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1797    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1798    #[deprecated = "  (Deprecated since 2021-06)"]
1799    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1800    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1801    #[deprecated = "  (Deprecated since 2021-06)"]
1802    #[doc = "Control the payload deployment."]
1803    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1804    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1805    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1806    #[doc = "Command to operate winch."]
1807    MAV_CMD_DO_WINCH = 42600,
1808    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1809    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1810    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1811    MAV_CMD_WAYPOINT_USER_1 = 31000,
1812    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1813    MAV_CMD_WAYPOINT_USER_2 = 31001,
1814    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1815    MAV_CMD_WAYPOINT_USER_3 = 31002,
1816    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1817    MAV_CMD_WAYPOINT_USER_4 = 31003,
1818    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1819    MAV_CMD_WAYPOINT_USER_5 = 31004,
1820    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1821    MAV_CMD_SPATIAL_USER_1 = 31005,
1822    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1823    MAV_CMD_SPATIAL_USER_2 = 31006,
1824    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1825    MAV_CMD_SPATIAL_USER_3 = 31007,
1826    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1827    MAV_CMD_SPATIAL_USER_4 = 31008,
1828    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1829    MAV_CMD_SPATIAL_USER_5 = 31009,
1830    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1831    MAV_CMD_USER_1 = 31010,
1832    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1833    MAV_CMD_USER_2 = 31011,
1834    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1835    MAV_CMD_USER_3 = 31012,
1836    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1837    MAV_CMD_USER_4 = 31013,
1838    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1839    MAV_CMD_USER_5 = 31014,
1840    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1841    MAV_CMD_CAN_FORWARD = 32000,
1842    #[doc = "AVSS defined command. Set PRS arm statuses."]
1843    MAV_CMD_PRS_SET_ARM = 60050,
1844    #[doc = "AVSS defined command. Gets PRS arm statuses"]
1845    MAV_CMD_PRS_GET_ARM = 60051,
1846    #[doc = "AVSS defined command.  Get the PRS battery voltage in millivolts"]
1847    MAV_CMD_PRS_GET_BATTERY = 60052,
1848    #[doc = "AVSS defined command. Get the PRS error statuses."]
1849    MAV_CMD_PRS_GET_ERR = 60053,
1850    #[doc = "AVSS defined command. Set the ATS arming altitude in meters."]
1851    MAV_CMD_PRS_SET_ARM_ALTI = 60070,
1852    #[doc = "AVSS defined command. Get the ATS arming altitude in meters."]
1853    MAV_CMD_PRS_GET_ARM_ALTI = 60071,
1854    #[doc = "AVSS defined command. Shuts down the PRS system."]
1855    MAV_CMD_PRS_SHUTDOWN = 60072,
1856}
1857impl MavCmd {
1858    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1859}
1860impl Default for MavCmd {
1861    fn default() -> Self {
1862        Self::DEFAULT
1863    }
1864}
1865#[cfg_attr(feature = "ts", derive(TS))]
1866#[cfg_attr(feature = "ts", ts(export))]
1867#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1869#[cfg_attr(feature = "serde", serde(tag = "type"))]
1870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1871#[repr(u32)]
1872#[doc = "Possible actions an aircraft can take to avoid a collision."]
1873pub enum MavCollisionAction {
1874    #[doc = "Ignore any potential collisions"]
1875    MAV_COLLISION_ACTION_NONE = 0,
1876    #[doc = "Report potential collision"]
1877    MAV_COLLISION_ACTION_REPORT = 1,
1878    #[doc = "Ascend or Descend to avoid threat"]
1879    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1880    #[doc = "Move horizontally to avoid threat"]
1881    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1882    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1883    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1884    #[doc = "Aircraft to fly directly back to its launch point"]
1885    MAV_COLLISION_ACTION_RTL = 5,
1886    #[doc = "Aircraft to stop in place"]
1887    MAV_COLLISION_ACTION_HOVER = 6,
1888}
1889impl MavCollisionAction {
1890    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1891}
1892impl Default for MavCollisionAction {
1893    fn default() -> Self {
1894        Self::DEFAULT
1895    }
1896}
1897#[cfg_attr(feature = "ts", derive(TS))]
1898#[cfg_attr(feature = "ts", ts(export))]
1899#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1901#[cfg_attr(feature = "serde", serde(tag = "type"))]
1902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1903#[repr(u32)]
1904#[doc = "Source of information about this collision."]
1905pub enum MavCollisionSrc {
1906    #[doc = "ID field references ADSB_VEHICLE packets"]
1907    MAV_COLLISION_SRC_ADSB = 0,
1908    #[doc = "ID field references MAVLink SRC ID"]
1909    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1910}
1911impl MavCollisionSrc {
1912    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1913}
1914impl Default for MavCollisionSrc {
1915    fn default() -> Self {
1916        Self::DEFAULT
1917    }
1918}
1919#[cfg_attr(feature = "ts", derive(TS))]
1920#[cfg_attr(feature = "ts", ts(export))]
1921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1923#[cfg_attr(feature = "serde", serde(tag = "type"))]
1924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1925#[repr(u32)]
1926#[doc = "Aircraft-rated danger from this threat."]
1927pub enum MavCollisionThreatLevel {
1928    #[doc = "Not a threat"]
1929    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1930    #[doc = "Craft is mildly concerned about this threat"]
1931    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1932    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1933    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1934}
1935impl MavCollisionThreatLevel {
1936    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1937}
1938impl Default for MavCollisionThreatLevel {
1939    fn default() -> Self {
1940        Self::DEFAULT
1941    }
1942}
1943#[cfg_attr(feature = "ts", derive(TS))]
1944#[cfg_attr(feature = "ts", ts(export))]
1945#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1947#[cfg_attr(feature = "serde", serde(tag = "type"))]
1948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1949#[repr(u32)]
1950#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1951pub enum MavComponent {
1952    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1953    MAV_COMP_ID_ALL = 0,
1954    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1955    MAV_COMP_ID_AUTOPILOT1 = 1,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER1 = 25,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER2 = 26,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER3 = 27,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER4 = 28,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER5 = 29,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER6 = 30,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER7 = 31,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER8 = 32,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER9 = 33,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER10 = 34,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER11 = 35,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER12 = 36,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER13 = 37,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER14 = 38,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER15 = 39,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER16 = 40,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER17 = 41,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER18 = 42,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER19 = 43,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER20 = 44,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER21 = 45,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER22 = 46,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER23 = 47,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER24 = 48,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER25 = 49,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER26 = 50,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER27 = 51,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER28 = 52,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER29 = 53,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER30 = 54,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER31 = 55,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER32 = 56,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER33 = 57,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER34 = 58,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER35 = 59,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER36 = 60,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER37 = 61,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER38 = 62,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER39 = 63,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER40 = 64,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER41 = 65,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER42 = 66,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER43 = 67,
2042    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2043    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2045    MAV_COMP_ID_USER45 = 69,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER46 = 70,
2048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2049    MAV_COMP_ID_USER47 = 71,
2050    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2051    MAV_COMP_ID_USER48 = 72,
2052    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2053    MAV_COMP_ID_USER49 = 73,
2054    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2055    MAV_COMP_ID_USER50 = 74,
2056    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2057    MAV_COMP_ID_USER51 = 75,
2058    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2059    MAV_COMP_ID_USER52 = 76,
2060    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2061    MAV_COMP_ID_USER53 = 77,
2062    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2063    MAV_COMP_ID_USER54 = 78,
2064    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2065    MAV_COMP_ID_USER55 = 79,
2066    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2067    MAV_COMP_ID_USER56 = 80,
2068    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2069    MAV_COMP_ID_USER57 = 81,
2070    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2071    MAV_COMP_ID_USER58 = 82,
2072    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2073    MAV_COMP_ID_USER59 = 83,
2074    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2075    MAV_COMP_ID_USER60 = 84,
2076    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2077    MAV_COMP_ID_USER61 = 85,
2078    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2079    MAV_COMP_ID_USER62 = 86,
2080    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2081    MAV_COMP_ID_USER63 = 87,
2082    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2083    MAV_COMP_ID_USER64 = 88,
2084    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2085    MAV_COMP_ID_USER65 = 89,
2086    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2087    MAV_COMP_ID_USER66 = 90,
2088    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2089    MAV_COMP_ID_USER67 = 91,
2090    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2091    MAV_COMP_ID_USER68 = 92,
2092    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2093    MAV_COMP_ID_USER69 = 93,
2094    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2095    MAV_COMP_ID_USER70 = 94,
2096    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2097    MAV_COMP_ID_USER71 = 95,
2098    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2099    MAV_COMP_ID_USER72 = 96,
2100    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2101    MAV_COMP_ID_USER73 = 97,
2102    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2103    MAV_COMP_ID_USER74 = 98,
2104    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2105    MAV_COMP_ID_USER75 = 99,
2106    #[doc = "Camera #1."]
2107    MAV_COMP_ID_CAMERA = 100,
2108    #[doc = "Camera #2."]
2109    MAV_COMP_ID_CAMERA2 = 101,
2110    #[doc = "Camera #3."]
2111    MAV_COMP_ID_CAMERA3 = 102,
2112    #[doc = "Camera #4."]
2113    MAV_COMP_ID_CAMERA4 = 103,
2114    #[doc = "Camera #5."]
2115    MAV_COMP_ID_CAMERA5 = 104,
2116    #[doc = "Camera #6."]
2117    MAV_COMP_ID_CAMERA6 = 105,
2118    #[doc = "Servo #1."]
2119    MAV_COMP_ID_SERVO1 = 140,
2120    #[doc = "Servo #2."]
2121    MAV_COMP_ID_SERVO2 = 141,
2122    #[doc = "Servo #3."]
2123    MAV_COMP_ID_SERVO3 = 142,
2124    #[doc = "Servo #4."]
2125    MAV_COMP_ID_SERVO4 = 143,
2126    #[doc = "Servo #5."]
2127    MAV_COMP_ID_SERVO5 = 144,
2128    #[doc = "Servo #6."]
2129    MAV_COMP_ID_SERVO6 = 145,
2130    #[doc = "Servo #7."]
2131    MAV_COMP_ID_SERVO7 = 146,
2132    #[doc = "Servo #8."]
2133    MAV_COMP_ID_SERVO8 = 147,
2134    #[doc = "Servo #9."]
2135    MAV_COMP_ID_SERVO9 = 148,
2136    #[doc = "Servo #10."]
2137    MAV_COMP_ID_SERVO10 = 149,
2138    #[doc = "Servo #11."]
2139    MAV_COMP_ID_SERVO11 = 150,
2140    #[doc = "Servo #12."]
2141    MAV_COMP_ID_SERVO12 = 151,
2142    #[doc = "Servo #13."]
2143    MAV_COMP_ID_SERVO13 = 152,
2144    #[doc = "Servo #14."]
2145    MAV_COMP_ID_SERVO14 = 153,
2146    #[doc = "Gimbal #1."]
2147    MAV_COMP_ID_GIMBAL = 154,
2148    #[doc = "Logging component."]
2149    MAV_COMP_ID_LOG = 155,
2150    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2151    MAV_COMP_ID_ADSB = 156,
2152    #[doc = "On Screen Display (OSD) devices for video links."]
2153    MAV_COMP_ID_OSD = 157,
2154    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2155    MAV_COMP_ID_PERIPHERAL = 158,
2156    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2157    #[doc = "Gimbal ID for QX1."]
2158    MAV_COMP_ID_QX1_GIMBAL = 159,
2159    #[doc = "FLARM collision alert component."]
2160    MAV_COMP_ID_FLARM = 160,
2161    #[doc = "Parachute component."]
2162    MAV_COMP_ID_PARACHUTE = 161,
2163    #[doc = "Winch component."]
2164    MAV_COMP_ID_WINCH = 169,
2165    #[doc = "Gimbal #2."]
2166    MAV_COMP_ID_GIMBAL2 = 171,
2167    #[doc = "Gimbal #3."]
2168    MAV_COMP_ID_GIMBAL3 = 172,
2169    #[doc = "Gimbal #4"]
2170    MAV_COMP_ID_GIMBAL4 = 173,
2171    #[doc = "Gimbal #5."]
2172    MAV_COMP_ID_GIMBAL5 = 174,
2173    #[doc = "Gimbal #6."]
2174    MAV_COMP_ID_GIMBAL6 = 175,
2175    #[doc = "Battery #1."]
2176    MAV_COMP_ID_BATTERY = 180,
2177    #[doc = "Battery #2."]
2178    MAV_COMP_ID_BATTERY2 = 181,
2179    #[doc = "CAN over MAVLink client."]
2180    MAV_COMP_ID_MAVCAN = 189,
2181    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2182    MAV_COMP_ID_MISSIONPLANNER = 190,
2183    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2184    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2185    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2186    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2187    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2188    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2189    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2190    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2191    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2192    MAV_COMP_ID_PATHPLANNER = 195,
2193    #[doc = "Component that plans a collision free path between two points."]
2194    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2195    #[doc = "Component that provides position estimates using VIO techniques."]
2196    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2197    #[doc = "Component that manages pairing of vehicle and GCS."]
2198    MAV_COMP_ID_PAIRING_MANAGER = 198,
2199    #[doc = "Inertial Measurement Unit (IMU) #1."]
2200    MAV_COMP_ID_IMU = 200,
2201    #[doc = "Inertial Measurement Unit (IMU) #2."]
2202    MAV_COMP_ID_IMU_2 = 201,
2203    #[doc = "Inertial Measurement Unit (IMU) #3."]
2204    MAV_COMP_ID_IMU_3 = 202,
2205    #[doc = "GPS #1."]
2206    MAV_COMP_ID_GPS = 220,
2207    #[doc = "GPS #2."]
2208    MAV_COMP_ID_GPS2 = 221,
2209    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2210    MAV_COMP_ID_ODID_TXRX_1 = 236,
2211    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2212    MAV_COMP_ID_ODID_TXRX_2 = 237,
2213    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2214    MAV_COMP_ID_ODID_TXRX_3 = 238,
2215    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2216    MAV_COMP_ID_UDP_BRIDGE = 240,
2217    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2218    MAV_COMP_ID_UART_BRIDGE = 241,
2219    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2220    MAV_COMP_ID_TUNNEL_NODE = 242,
2221    #[doc = "Illuminator"]
2222    MAV_COMP_ID_ILLUMINATOR = 243,
2223    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2224    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2225    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2226}
2227impl MavComponent {
2228    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2229}
2230impl Default for MavComponent {
2231    fn default() -> Self {
2232        Self::DEFAULT
2233    }
2234}
2235#[cfg_attr(feature = "ts", derive(TS))]
2236#[cfg_attr(feature = "ts", ts(export))]
2237#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2239#[cfg_attr(feature = "serde", serde(tag = "type"))]
2240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2241#[repr(u32)]
2242#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2243#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2244pub enum MavDataStream {
2245    #[doc = "Enable all data streams"]
2246    MAV_DATA_STREAM_ALL = 0,
2247    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2248    MAV_DATA_STREAM_RAW_SENSORS = 1,
2249    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2250    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2251    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2252    MAV_DATA_STREAM_RC_CHANNELS = 3,
2253    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2254    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2255    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2256    MAV_DATA_STREAM_POSITION = 6,
2257    #[doc = "Dependent on the autopilot"]
2258    MAV_DATA_STREAM_EXTRA1 = 10,
2259    #[doc = "Dependent on the autopilot"]
2260    MAV_DATA_STREAM_EXTRA2 = 11,
2261    #[doc = "Dependent on the autopilot"]
2262    MAV_DATA_STREAM_EXTRA3 = 12,
2263}
2264impl MavDataStream {
2265    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2266}
2267impl Default for MavDataStream {
2268    fn default() -> Self {
2269        Self::DEFAULT
2270    }
2271}
2272#[cfg_attr(feature = "ts", derive(TS))]
2273#[cfg_attr(feature = "ts", ts(export))]
2274#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2276#[cfg_attr(feature = "serde", serde(tag = "type"))]
2277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2278#[repr(u32)]
2279#[doc = "Enumeration of distance sensor types"]
2280pub enum MavDistanceSensor {
2281    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2282    MAV_DISTANCE_SENSOR_LASER = 0,
2283    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2284    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2285    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2286    MAV_DISTANCE_SENSOR_INFRARED = 2,
2287    #[doc = "Radar type, e.g. uLanding units"]
2288    MAV_DISTANCE_SENSOR_RADAR = 3,
2289    #[doc = "Broken or unknown type, e.g. analog units"]
2290    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2291}
2292impl MavDistanceSensor {
2293    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2294}
2295impl Default for MavDistanceSensor {
2296    fn default() -> Self {
2297        Self::DEFAULT
2298    }
2299}
2300#[cfg_attr(feature = "ts", derive(TS))]
2301#[cfg_attr(feature = "ts", ts(export))]
2302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2304#[cfg_attr(feature = "serde", serde(tag = "type"))]
2305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2306#[repr(u32)]
2307#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2308pub enum MavDoRepositionFlags {
2309    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2310    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2311}
2312impl MavDoRepositionFlags {
2313    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2314}
2315impl Default for MavDoRepositionFlags {
2316    fn default() -> Self {
2317        Self::DEFAULT
2318    }
2319}
2320#[cfg_attr(feature = "ts", derive(TS))]
2321#[cfg_attr(feature = "ts", ts(export))]
2322#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2324#[cfg_attr(feature = "serde", serde(tag = "type"))]
2325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2326#[repr(u32)]
2327#[doc = "Enumeration of estimator types"]
2328pub enum MavEstimatorType {
2329    #[doc = "Unknown type of the estimator."]
2330    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2331    #[doc = "This is a naive estimator without any real covariance feedback."]
2332    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2333    #[doc = "Computer vision based estimate. Might be up to scale."]
2334    MAV_ESTIMATOR_TYPE_VISION = 2,
2335    #[doc = "Visual-inertial estimate."]
2336    MAV_ESTIMATOR_TYPE_VIO = 3,
2337    #[doc = "Plain GPS estimate."]
2338    MAV_ESTIMATOR_TYPE_GPS = 4,
2339    #[doc = "Estimator integrating GPS and inertial sensing."]
2340    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2341    #[doc = "Estimate from external motion capturing system."]
2342    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2343    #[doc = "Estimator based on lidar sensor input."]
2344    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2345    #[doc = "Estimator on autopilot."]
2346    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2347}
2348impl MavEstimatorType {
2349    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2350}
2351impl Default for MavEstimatorType {
2352    fn default() -> Self {
2353        Self::DEFAULT
2354    }
2355}
2356#[cfg_attr(feature = "ts", derive(TS))]
2357#[cfg_attr(feature = "ts", ts(export))]
2358#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2360#[cfg_attr(feature = "serde", serde(tag = "type"))]
2361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2362#[repr(u32)]
2363#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2364pub enum MavEventCurrentSequenceFlags {
2365    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2366    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2367}
2368impl MavEventCurrentSequenceFlags {
2369    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2370}
2371impl Default for MavEventCurrentSequenceFlags {
2372    fn default() -> Self {
2373        Self::DEFAULT
2374    }
2375}
2376#[cfg_attr(feature = "ts", derive(TS))]
2377#[cfg_attr(feature = "ts", ts(export))]
2378#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2380#[cfg_attr(feature = "serde", serde(tag = "type"))]
2381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2382#[repr(u32)]
2383#[doc = "Reason for an event error response."]
2384pub enum MavEventErrorReason {
2385    #[doc = "The requested event is not available (anymore)."]
2386    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2387}
2388impl MavEventErrorReason {
2389    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2390}
2391impl Default for MavEventErrorReason {
2392    fn default() -> Self {
2393        Self::DEFAULT
2394    }
2395}
2396#[cfg_attr(feature = "ts", derive(TS))]
2397#[cfg_attr(feature = "ts", ts(export))]
2398#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2400#[cfg_attr(feature = "serde", serde(tag = "type"))]
2401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2402#[repr(u32)]
2403#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2404pub enum MavFrame {
2405    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2406    MAV_FRAME_GLOBAL = 0,
2407    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2408    MAV_FRAME_LOCAL_NED = 1,
2409    #[doc = "NOT a coordinate frame, indicates a mission command."]
2410    MAV_FRAME_MISSION = 2,
2411    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2412    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2413    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2414    MAV_FRAME_LOCAL_ENU = 4,
2415    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2416    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2417    MAV_FRAME_GLOBAL_INT = 5,
2418    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2419    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2420    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2421    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2422    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2423    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2424    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2425    MAV_FRAME_BODY_NED = 8,
2426    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2427    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2428    MAV_FRAME_BODY_OFFSET_NED = 9,
2429    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2430    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2431    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2432    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2433    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2434    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2435    MAV_FRAME_BODY_FRD = 12,
2436    #[deprecated = "  (Deprecated since 2019-04)"]
2437    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2438    MAV_FRAME_RESERVED_13 = 13,
2439    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2440    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2441    MAV_FRAME_RESERVED_14 = 14,
2442    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2443    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2444    MAV_FRAME_RESERVED_15 = 15,
2445    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2446    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2447    MAV_FRAME_RESERVED_16 = 16,
2448    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2449    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2450    MAV_FRAME_RESERVED_17 = 17,
2451    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2452    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2453    MAV_FRAME_RESERVED_18 = 18,
2454    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2455    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2456    MAV_FRAME_RESERVED_19 = 19,
2457    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2458    MAV_FRAME_LOCAL_FRD = 20,
2459    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2460    MAV_FRAME_LOCAL_FLU = 21,
2461}
2462impl MavFrame {
2463    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2464}
2465impl Default for MavFrame {
2466    fn default() -> Self {
2467        Self::DEFAULT
2468    }
2469}
2470#[cfg_attr(feature = "ts", derive(TS))]
2471#[cfg_attr(feature = "ts", ts(export))]
2472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2474#[cfg_attr(feature = "serde", serde(tag = "type"))]
2475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2476#[repr(u32)]
2477#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2478pub enum MavFtpErr {
2479    #[doc = "None: No error"]
2480    MAV_FTP_ERR_NONE = 0,
2481    #[doc = "Fail: Unknown failure"]
2482    MAV_FTP_ERR_FAIL = 1,
2483    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2484    MAV_FTP_ERR_FAILERRNO = 2,
2485    #[doc = "InvalidDataSize: Payload size is invalid"]
2486    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2487    #[doc = "InvalidSession: Session is not currently open"]
2488    MAV_FTP_ERR_INVALIDSESSION = 4,
2489    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2490    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2491    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2492    MAV_FTP_ERR_EOF = 6,
2493    #[doc = "UnknownCommand: Unknown command / opcode"]
2494    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2495    #[doc = "FileExists: File/directory already exists"]
2496    MAV_FTP_ERR_FILEEXISTS = 8,
2497    #[doc = "FileProtected: File/directory is write protected"]
2498    MAV_FTP_ERR_FILEPROTECTED = 9,
2499    #[doc = "FileNotFound: File/directory not found"]
2500    MAV_FTP_ERR_FILENOTFOUND = 10,
2501}
2502impl MavFtpErr {
2503    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2504}
2505impl Default for MavFtpErr {
2506    fn default() -> Self {
2507        Self::DEFAULT
2508    }
2509}
2510#[cfg_attr(feature = "ts", derive(TS))]
2511#[cfg_attr(feature = "ts", ts(export))]
2512#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2514#[cfg_attr(feature = "serde", serde(tag = "type"))]
2515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2516#[repr(u32)]
2517#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2518pub enum MavFtpOpcode {
2519    #[doc = "None. Ignored, always ACKed"]
2520    MAV_FTP_OPCODE_NONE = 0,
2521    #[doc = "TerminateSession: Terminates open Read session"]
2522    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2523    #[doc = "ResetSessions: Terminates all open read sessions"]
2524    MAV_FTP_OPCODE_RESETSESSION = 2,
2525    #[doc = "ListDirectory. List files and directories in path from offset"]
2526    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2527    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2528    MAV_FTP_OPCODE_OPENFILERO = 4,
2529    #[doc = "ReadFile: Reads size bytes from offset in session"]
2530    MAV_FTP_OPCODE_READFILE = 5,
2531    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2532    MAV_FTP_OPCODE_CREATEFILE = 6,
2533    #[doc = "WriteFile: Writes size bytes to offset in session"]
2534    MAV_FTP_OPCODE_WRITEFILE = 7,
2535    #[doc = "RemoveFile: Remove file at path"]
2536    MAV_FTP_OPCODE_REMOVEFILE = 8,
2537    #[doc = "CreateDirectory: Creates directory at path"]
2538    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2539    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2540    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2541    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2542    MAV_FTP_OPCODE_OPENFILEWO = 11,
2543    #[doc = "TruncateFile: Truncate file at path to offset length"]
2544    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2545    #[doc = "Rename: Rename path1 to path2"]
2546    MAV_FTP_OPCODE_RENAME = 13,
2547    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2548    MAV_FTP_OPCODE_CALCFILECRC = 14,
2549    #[doc = "BurstReadFile: Burst download session file"]
2550    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2551    #[doc = "ACK: ACK response"]
2552    MAV_FTP_OPCODE_ACK = 128,
2553    #[doc = "NAK: NAK response"]
2554    MAV_FTP_OPCODE_NAK = 129,
2555}
2556impl MavFtpOpcode {
2557    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2558}
2559impl Default for MavFtpOpcode {
2560    fn default() -> Self {
2561        Self::DEFAULT
2562    }
2563}
2564#[cfg_attr(feature = "ts", derive(TS))]
2565#[cfg_attr(feature = "ts", ts(export))]
2566#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2568#[cfg_attr(feature = "serde", serde(tag = "type"))]
2569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2570#[repr(u32)]
2571#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2572pub enum MavFuelType {
2573    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2574    MAV_FUEL_TYPE_UNKNOWN = 0,
2575    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2576    MAV_FUEL_TYPE_LIQUID = 1,
2577    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2578    MAV_FUEL_TYPE_GAS = 2,
2579}
2580impl MavFuelType {
2581    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2582}
2583impl Default for MavFuelType {
2584    fn default() -> Self {
2585        Self::DEFAULT
2586    }
2587}
2588bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2589impl MavGeneratorStatusFlag {
2590    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2591}
2592impl Default for MavGeneratorStatusFlag {
2593    fn default() -> Self {
2594        Self::DEFAULT
2595    }
2596}
2597#[cfg_attr(feature = "ts", derive(TS))]
2598#[cfg_attr(feature = "ts", ts(export))]
2599#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2601#[cfg_attr(feature = "serde", serde(tag = "type"))]
2602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2603#[repr(u32)]
2604#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2605pub enum MavGoto {
2606    #[doc = "Hold at the current position."]
2607    MAV_GOTO_DO_HOLD = 0,
2608    #[doc = "Continue with the next item in mission execution."]
2609    MAV_GOTO_DO_CONTINUE = 1,
2610    #[doc = "Hold at the current position of the system"]
2611    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2612    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2613    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2614}
2615impl MavGoto {
2616    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2617}
2618impl Default for MavGoto {
2619    fn default() -> Self {
2620        Self::DEFAULT
2621    }
2622}
2623#[cfg_attr(feature = "ts", derive(TS))]
2624#[cfg_attr(feature = "ts", ts(export))]
2625#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2627#[cfg_attr(feature = "serde", serde(tag = "type"))]
2628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2629#[repr(u32)]
2630#[doc = "Enumeration of landed detector states"]
2631pub enum MavLandedState {
2632    #[doc = "MAV landed state is unknown"]
2633    MAV_LANDED_STATE_UNDEFINED = 0,
2634    #[doc = "MAV is landed (on ground)"]
2635    MAV_LANDED_STATE_ON_GROUND = 1,
2636    #[doc = "MAV is in air"]
2637    MAV_LANDED_STATE_IN_AIR = 2,
2638    #[doc = "MAV currently taking off"]
2639    MAV_LANDED_STATE_TAKEOFF = 3,
2640    #[doc = "MAV currently landing"]
2641    MAV_LANDED_STATE_LANDING = 4,
2642}
2643impl MavLandedState {
2644    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2645}
2646impl Default for MavLandedState {
2647    fn default() -> Self {
2648        Self::DEFAULT
2649    }
2650}
2651#[cfg_attr(feature = "ts", derive(TS))]
2652#[cfg_attr(feature = "ts", ts(export))]
2653#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2655#[cfg_attr(feature = "serde", serde(tag = "type"))]
2656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2657#[repr(u32)]
2658#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2659pub enum MavMissionResult {
2660    #[doc = "mission accepted OK"]
2661    MAV_MISSION_ACCEPTED = 0,
2662    #[doc = "Generic error / not accepting mission commands at all right now."]
2663    MAV_MISSION_ERROR = 1,
2664    #[doc = "Coordinate frame is not supported."]
2665    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2666    #[doc = "Command is not supported."]
2667    MAV_MISSION_UNSUPPORTED = 3,
2668    #[doc = "Mission items exceed storage space."]
2669    MAV_MISSION_NO_SPACE = 4,
2670    #[doc = "One of the parameters has an invalid value."]
2671    MAV_MISSION_INVALID = 5,
2672    #[doc = "param1 has an invalid value."]
2673    MAV_MISSION_INVALID_PARAM1 = 6,
2674    #[doc = "param2 has an invalid value."]
2675    MAV_MISSION_INVALID_PARAM2 = 7,
2676    #[doc = "param3 has an invalid value."]
2677    MAV_MISSION_INVALID_PARAM3 = 8,
2678    #[doc = "param4 has an invalid value."]
2679    MAV_MISSION_INVALID_PARAM4 = 9,
2680    #[doc = "x / param5 has an invalid value."]
2681    MAV_MISSION_INVALID_PARAM5_X = 10,
2682    #[doc = "y / param6 has an invalid value."]
2683    MAV_MISSION_INVALID_PARAM6_Y = 11,
2684    #[doc = "z / param7 has an invalid value."]
2685    MAV_MISSION_INVALID_PARAM7 = 12,
2686    #[doc = "Mission item received out of sequence"]
2687    MAV_MISSION_INVALID_SEQUENCE = 13,
2688    #[doc = "Not accepting any mission commands from this communication partner."]
2689    MAV_MISSION_DENIED = 14,
2690    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2691    MAV_MISSION_OPERATION_CANCELLED = 15,
2692}
2693impl MavMissionResult {
2694    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2695}
2696impl Default for MavMissionResult {
2697    fn default() -> Self {
2698        Self::DEFAULT
2699    }
2700}
2701#[cfg_attr(feature = "ts", derive(TS))]
2702#[cfg_attr(feature = "ts", ts(export))]
2703#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2705#[cfg_attr(feature = "serde", serde(tag = "type"))]
2706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2707#[repr(u32)]
2708#[doc = "Type of mission items being requested/sent in mission protocol."]
2709pub enum MavMissionType {
2710    #[doc = "Items are mission commands for main mission."]
2711    MAV_MISSION_TYPE_MISSION = 0,
2712    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2713    MAV_MISSION_TYPE_FENCE = 1,
2714    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2715    MAV_MISSION_TYPE_RALLY = 2,
2716    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2717    MAV_MISSION_TYPE_ALL = 255,
2718}
2719impl MavMissionType {
2720    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2721}
2722impl Default for MavMissionType {
2723    fn default() -> Self {
2724        Self::DEFAULT
2725    }
2726}
2727#[cfg_attr(feature = "ts", derive(TS))]
2728#[cfg_attr(feature = "ts", ts(export))]
2729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2731#[cfg_attr(feature = "serde", serde(tag = "type"))]
2732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2733#[repr(u32)]
2734#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2735pub enum MavMode {
2736    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2737    MAV_MODE_PREFLIGHT = 0,
2738    #[doc = "System is allowed to be active, under assisted RC control."]
2739    MAV_MODE_STABILIZE_DISARMED = 80,
2740    #[doc = "System is allowed to be active, under assisted RC control."]
2741    MAV_MODE_STABILIZE_ARMED = 208,
2742    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2743    MAV_MODE_MANUAL_DISARMED = 64,
2744    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2745    MAV_MODE_MANUAL_ARMED = 192,
2746    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2747    MAV_MODE_GUIDED_DISARMED = 88,
2748    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2749    MAV_MODE_GUIDED_ARMED = 216,
2750    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2751    MAV_MODE_AUTO_DISARMED = 92,
2752    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2753    MAV_MODE_AUTO_ARMED = 220,
2754    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2755    MAV_MODE_TEST_DISARMED = 66,
2756    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2757    MAV_MODE_TEST_ARMED = 194,
2758}
2759impl MavMode {
2760    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2761}
2762impl Default for MavMode {
2763    fn default() -> Self {
2764        Self::DEFAULT
2765    }
2766}
2767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2768impl MavModeFlag {
2769    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2770}
2771impl Default for MavModeFlag {
2772    fn default() -> Self {
2773        Self::DEFAULT
2774    }
2775}
2776#[cfg_attr(feature = "ts", derive(TS))]
2777#[cfg_attr(feature = "ts", ts(export))]
2778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2780#[cfg_attr(feature = "serde", serde(tag = "type"))]
2781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2782#[repr(u32)]
2783#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2784pub enum MavModeFlagDecodePosition {
2785    #[doc = "First bit:  10000000"]
2786    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2787    #[doc = "Second bit: 01000000"]
2788    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2789    #[doc = "Third bit:  00100000"]
2790    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2791    #[doc = "Fourth bit: 00010000"]
2792    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2793    #[doc = "Fifth bit:  00001000"]
2794    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2795    #[doc = "Sixth bit:   00000100"]
2796    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2797    #[doc = "Seventh bit: 00000010"]
2798    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2799    #[doc = "Eighth bit: 00000001"]
2800    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2801}
2802impl MavModeFlagDecodePosition {
2803    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2804}
2805impl Default for MavModeFlagDecodePosition {
2806    fn default() -> Self {
2807        Self::DEFAULT
2808    }
2809}
2810bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2811impl MavModeProperty {
2812    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2813}
2814impl Default for MavModeProperty {
2815    fn default() -> Self {
2816        Self::DEFAULT
2817    }
2818}
2819#[cfg_attr(feature = "ts", derive(TS))]
2820#[cfg_attr(feature = "ts", ts(export))]
2821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2823#[cfg_attr(feature = "serde", serde(tag = "type"))]
2824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2825#[repr(u32)]
2826#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2827#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2828pub enum MavMountMode {
2829    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2830    MAV_MOUNT_MODE_RETRACT = 0,
2831    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2832    MAV_MOUNT_MODE_NEUTRAL = 1,
2833    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2834    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2835    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2836    MAV_MOUNT_MODE_RC_TARGETING = 3,
2837    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2838    MAV_MOUNT_MODE_GPS_POINT = 4,
2839    #[doc = "Gimbal tracks system with specified system ID"]
2840    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2841    #[doc = "Gimbal tracks home position"]
2842    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2843}
2844impl MavMountMode {
2845    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2846}
2847impl Default for MavMountMode {
2848    fn default() -> Self {
2849        Self::DEFAULT
2850    }
2851}
2852#[cfg_attr(feature = "ts", derive(TS))]
2853#[cfg_attr(feature = "ts", ts(export))]
2854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2856#[cfg_attr(feature = "serde", serde(tag = "type"))]
2857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2858#[repr(u32)]
2859pub enum MavOdidArmStatus {
2860    #[doc = "Passing arming checks."]
2861    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2862    #[doc = "Generic arming failure, see error string for details."]
2863    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2864}
2865impl MavOdidArmStatus {
2866    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2867}
2868impl Default for MavOdidArmStatus {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[cfg_attr(feature = "ts", derive(TS))]
2874#[cfg_attr(feature = "ts", ts(export))]
2875#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "serde", serde(tag = "type"))]
2878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2879#[repr(u32)]
2880pub enum MavOdidAuthType {
2881    #[doc = "No authentication type is specified."]
2882    MAV_ODID_AUTH_TYPE_NONE = 0,
2883    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2884    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2885    #[doc = "Signature for the Operator ID."]
2886    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2887    #[doc = "Signature for the entire message set."]
2888    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2889    #[doc = "Authentication is provided by Network Remote ID."]
2890    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2891    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2892    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2893}
2894impl MavOdidAuthType {
2895    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2896}
2897impl Default for MavOdidAuthType {
2898    fn default() -> Self {
2899        Self::DEFAULT
2900    }
2901}
2902#[cfg_attr(feature = "ts", derive(TS))]
2903#[cfg_attr(feature = "ts", ts(export))]
2904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2906#[cfg_attr(feature = "serde", serde(tag = "type"))]
2907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2908#[repr(u32)]
2909pub enum MavOdidCategoryEu {
2910    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2911    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2912    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2913    MAV_ODID_CATEGORY_EU_OPEN = 1,
2914    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2915    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2916    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2917    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2918}
2919impl MavOdidCategoryEu {
2920    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2921}
2922impl Default for MavOdidCategoryEu {
2923    fn default() -> Self {
2924        Self::DEFAULT
2925    }
2926}
2927#[cfg_attr(feature = "ts", derive(TS))]
2928#[cfg_attr(feature = "ts", ts(export))]
2929#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2931#[cfg_attr(feature = "serde", serde(tag = "type"))]
2932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2933#[repr(u32)]
2934pub enum MavOdidClassEu {
2935    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2936    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2937    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2938    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2939    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2940    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2941    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2942    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2943    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2944    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2945    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2946    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2947    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2948    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2949    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2950    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2951}
2952impl MavOdidClassEu {
2953    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2954}
2955impl Default for MavOdidClassEu {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[cfg_attr(feature = "ts", derive(TS))]
2961#[cfg_attr(feature = "ts", ts(export))]
2962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2964#[cfg_attr(feature = "serde", serde(tag = "type"))]
2965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2966#[repr(u32)]
2967pub enum MavOdidClassificationType {
2968    #[doc = "The classification type for the UA is undeclared."]
2969    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2970    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2971    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2972}
2973impl MavOdidClassificationType {
2974    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2975}
2976impl Default for MavOdidClassificationType {
2977    fn default() -> Self {
2978        Self::DEFAULT
2979    }
2980}
2981#[cfg_attr(feature = "ts", derive(TS))]
2982#[cfg_attr(feature = "ts", ts(export))]
2983#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2985#[cfg_attr(feature = "serde", serde(tag = "type"))]
2986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2987#[repr(u32)]
2988pub enum MavOdidDescType {
2989    #[doc = "Optional free-form text description of the purpose of the flight."]
2990    MAV_ODID_DESC_TYPE_TEXT = 0,
2991    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2992    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2993    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2994    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2995}
2996impl MavOdidDescType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2998}
2999impl Default for MavOdidDescType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidHeightRef {
3012    #[doc = "The height field is relative to the take-off location."]
3013    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3014    #[doc = "The height field is relative to ground."]
3015    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3016}
3017impl MavOdidHeightRef {
3018    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3019}
3020impl Default for MavOdidHeightRef {
3021    fn default() -> Self {
3022        Self::DEFAULT
3023    }
3024}
3025#[cfg_attr(feature = "ts", derive(TS))]
3026#[cfg_attr(feature = "ts", ts(export))]
3027#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3029#[cfg_attr(feature = "serde", serde(tag = "type"))]
3030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3031#[repr(u32)]
3032pub enum MavOdidHorAcc {
3033    #[doc = "The horizontal accuracy is unknown."]
3034    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3035    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3036    MAV_ODID_HOR_ACC_10NM = 1,
3037    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3038    MAV_ODID_HOR_ACC_4NM = 2,
3039    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3040    MAV_ODID_HOR_ACC_2NM = 3,
3041    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3042    MAV_ODID_HOR_ACC_1NM = 4,
3043    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3044    MAV_ODID_HOR_ACC_0_5NM = 5,
3045    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3046    MAV_ODID_HOR_ACC_0_3NM = 6,
3047    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3048    MAV_ODID_HOR_ACC_0_1NM = 7,
3049    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3050    MAV_ODID_HOR_ACC_0_05NM = 8,
3051    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3052    MAV_ODID_HOR_ACC_30_METER = 9,
3053    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3054    MAV_ODID_HOR_ACC_10_METER = 10,
3055    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3056    MAV_ODID_HOR_ACC_3_METER = 11,
3057    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3058    MAV_ODID_HOR_ACC_1_METER = 12,
3059}
3060impl MavOdidHorAcc {
3061    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3062}
3063impl Default for MavOdidHorAcc {
3064    fn default() -> Self {
3065        Self::DEFAULT
3066    }
3067}
3068#[cfg_attr(feature = "ts", derive(TS))]
3069#[cfg_attr(feature = "ts", ts(export))]
3070#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3072#[cfg_attr(feature = "serde", serde(tag = "type"))]
3073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3074#[repr(u32)]
3075pub enum MavOdidIdType {
3076    #[doc = "No type defined."]
3077    MAV_ODID_ID_TYPE_NONE = 0,
3078    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3079    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3080    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3081    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3082    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3083    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3084    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3085    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3086}
3087impl MavOdidIdType {
3088    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3089}
3090impl Default for MavOdidIdType {
3091    fn default() -> Self {
3092        Self::DEFAULT
3093    }
3094}
3095#[cfg_attr(feature = "ts", derive(TS))]
3096#[cfg_attr(feature = "ts", ts(export))]
3097#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3099#[cfg_attr(feature = "serde", serde(tag = "type"))]
3100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3101#[repr(u32)]
3102pub enum MavOdidOperatorIdType {
3103    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3104    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3105}
3106impl MavOdidOperatorIdType {
3107    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3108}
3109impl Default for MavOdidOperatorIdType {
3110    fn default() -> Self {
3111        Self::DEFAULT
3112    }
3113}
3114#[cfg_attr(feature = "ts", derive(TS))]
3115#[cfg_attr(feature = "ts", ts(export))]
3116#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3118#[cfg_attr(feature = "serde", serde(tag = "type"))]
3119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3120#[repr(u32)]
3121pub enum MavOdidOperatorLocationType {
3122    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3123    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3124    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3125    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3126    #[doc = "The location/altitude of the operator are fixed values."]
3127    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3128}
3129impl MavOdidOperatorLocationType {
3130    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3131}
3132impl Default for MavOdidOperatorLocationType {
3133    fn default() -> Self {
3134        Self::DEFAULT
3135    }
3136}
3137#[cfg_attr(feature = "ts", derive(TS))]
3138#[cfg_attr(feature = "ts", ts(export))]
3139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3141#[cfg_attr(feature = "serde", serde(tag = "type"))]
3142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3143#[repr(u32)]
3144pub enum MavOdidSpeedAcc {
3145    #[doc = "The speed accuracy is unknown."]
3146    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3147    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3148    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3149    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3150    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3151    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3152    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3153    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3154    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3155}
3156impl MavOdidSpeedAcc {
3157    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3158}
3159impl Default for MavOdidSpeedAcc {
3160    fn default() -> Self {
3161        Self::DEFAULT
3162    }
3163}
3164#[cfg_attr(feature = "ts", derive(TS))]
3165#[cfg_attr(feature = "ts", ts(export))]
3166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3168#[cfg_attr(feature = "serde", serde(tag = "type"))]
3169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3170#[repr(u32)]
3171pub enum MavOdidStatus {
3172    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3173    MAV_ODID_STATUS_UNDECLARED = 0,
3174    #[doc = "The UA is on the ground."]
3175    MAV_ODID_STATUS_GROUND = 1,
3176    #[doc = "The UA is in the air."]
3177    MAV_ODID_STATUS_AIRBORNE = 2,
3178    #[doc = "The UA is having an emergency."]
3179    MAV_ODID_STATUS_EMERGENCY = 3,
3180    #[doc = "The remote ID system is failing or unreliable in some way."]
3181    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3182}
3183impl MavOdidStatus {
3184    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3185}
3186impl Default for MavOdidStatus {
3187    fn default() -> Self {
3188        Self::DEFAULT
3189    }
3190}
3191#[cfg_attr(feature = "ts", derive(TS))]
3192#[cfg_attr(feature = "ts", ts(export))]
3193#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3195#[cfg_attr(feature = "serde", serde(tag = "type"))]
3196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3197#[repr(u32)]
3198pub enum MavOdidTimeAcc {
3199    #[doc = "The timestamp accuracy is unknown."]
3200    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3201    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3202    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3203    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3204    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3205    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3206    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3207    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3208    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3209    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3210    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3211    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3212    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3213    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3214    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3215    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3216    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3217    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3218    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3219    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3220    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3221    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3222    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3223    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3224    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3225    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3226    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3227    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3228    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3229    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3230    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3231}
3232impl MavOdidTimeAcc {
3233    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3234}
3235impl Default for MavOdidTimeAcc {
3236    fn default() -> Self {
3237        Self::DEFAULT
3238    }
3239}
3240#[cfg_attr(feature = "ts", derive(TS))]
3241#[cfg_attr(feature = "ts", ts(export))]
3242#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3244#[cfg_attr(feature = "serde", serde(tag = "type"))]
3245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3246#[repr(u32)]
3247pub enum MavOdidUaType {
3248    #[doc = "No UA (Unmanned Aircraft) type defined."]
3249    MAV_ODID_UA_TYPE_NONE = 0,
3250    #[doc = "Aeroplane/Airplane. Fixed wing."]
3251    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3252    #[doc = "Helicopter or multirotor."]
3253    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3254    #[doc = "Gyroplane."]
3255    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3256    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3257    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3258    #[doc = "Ornithopter."]
3259    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3260    #[doc = "Glider."]
3261    MAV_ODID_UA_TYPE_GLIDER = 6,
3262    #[doc = "Kite."]
3263    MAV_ODID_UA_TYPE_KITE = 7,
3264    #[doc = "Free Balloon."]
3265    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3266    #[doc = "Captive Balloon."]
3267    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3268    #[doc = "Airship. E.g. a blimp."]
3269    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3270    #[doc = "Free Fall/Parachute (unpowered)."]
3271    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3272    #[doc = "Rocket."]
3273    MAV_ODID_UA_TYPE_ROCKET = 12,
3274    #[doc = "Tethered powered aircraft."]
3275    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3276    #[doc = "Ground Obstacle."]
3277    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3278    #[doc = "Other type of aircraft not listed earlier."]
3279    MAV_ODID_UA_TYPE_OTHER = 15,
3280}
3281impl MavOdidUaType {
3282    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3283}
3284impl Default for MavOdidUaType {
3285    fn default() -> Self {
3286        Self::DEFAULT
3287    }
3288}
3289#[cfg_attr(feature = "ts", derive(TS))]
3290#[cfg_attr(feature = "ts", ts(export))]
3291#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3293#[cfg_attr(feature = "serde", serde(tag = "type"))]
3294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3295#[repr(u32)]
3296pub enum MavOdidVerAcc {
3297    #[doc = "The vertical accuracy is unknown."]
3298    MAV_ODID_VER_ACC_UNKNOWN = 0,
3299    #[doc = "The vertical accuracy is smaller than 150 meter."]
3300    MAV_ODID_VER_ACC_150_METER = 1,
3301    #[doc = "The vertical accuracy is smaller than 45 meter."]
3302    MAV_ODID_VER_ACC_45_METER = 2,
3303    #[doc = "The vertical accuracy is smaller than 25 meter."]
3304    MAV_ODID_VER_ACC_25_METER = 3,
3305    #[doc = "The vertical accuracy is smaller than 10 meter."]
3306    MAV_ODID_VER_ACC_10_METER = 4,
3307    #[doc = "The vertical accuracy is smaller than 3 meter."]
3308    MAV_ODID_VER_ACC_3_METER = 5,
3309    #[doc = "The vertical accuracy is smaller than 1 meter."]
3310    MAV_ODID_VER_ACC_1_METER = 6,
3311}
3312impl MavOdidVerAcc {
3313    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3314}
3315impl Default for MavOdidVerAcc {
3316    fn default() -> Self {
3317        Self::DEFAULT
3318    }
3319}
3320#[cfg_attr(feature = "ts", derive(TS))]
3321#[cfg_attr(feature = "ts", ts(export))]
3322#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3324#[cfg_attr(feature = "serde", serde(tag = "type"))]
3325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3326#[repr(u32)]
3327#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3328pub enum MavParamExtType {
3329    #[doc = "8-bit unsigned integer"]
3330    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3331    #[doc = "8-bit signed integer"]
3332    MAV_PARAM_EXT_TYPE_INT8 = 2,
3333    #[doc = "16-bit unsigned integer"]
3334    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3335    #[doc = "16-bit signed integer"]
3336    MAV_PARAM_EXT_TYPE_INT16 = 4,
3337    #[doc = "32-bit unsigned integer"]
3338    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3339    #[doc = "32-bit signed integer"]
3340    MAV_PARAM_EXT_TYPE_INT32 = 6,
3341    #[doc = "64-bit unsigned integer"]
3342    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3343    #[doc = "64-bit signed integer"]
3344    MAV_PARAM_EXT_TYPE_INT64 = 8,
3345    #[doc = "32-bit floating-point"]
3346    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3347    #[doc = "64-bit floating-point"]
3348    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3349    #[doc = "Custom Type"]
3350    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3351}
3352impl MavParamExtType {
3353    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3354}
3355impl Default for MavParamExtType {
3356    fn default() -> Self {
3357        Self::DEFAULT
3358    }
3359}
3360#[cfg_attr(feature = "ts", derive(TS))]
3361#[cfg_attr(feature = "ts", ts(export))]
3362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3364#[cfg_attr(feature = "serde", serde(tag = "type"))]
3365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3366#[repr(u32)]
3367#[doc = "Specifies the datatype of a MAVLink parameter."]
3368pub enum MavParamType {
3369    #[doc = "8-bit unsigned integer"]
3370    MAV_PARAM_TYPE_UINT8 = 1,
3371    #[doc = "8-bit signed integer"]
3372    MAV_PARAM_TYPE_INT8 = 2,
3373    #[doc = "16-bit unsigned integer"]
3374    MAV_PARAM_TYPE_UINT16 = 3,
3375    #[doc = "16-bit signed integer"]
3376    MAV_PARAM_TYPE_INT16 = 4,
3377    #[doc = "32-bit unsigned integer"]
3378    MAV_PARAM_TYPE_UINT32 = 5,
3379    #[doc = "32-bit signed integer"]
3380    MAV_PARAM_TYPE_INT32 = 6,
3381    #[doc = "64-bit unsigned integer"]
3382    MAV_PARAM_TYPE_UINT64 = 7,
3383    #[doc = "64-bit signed integer"]
3384    MAV_PARAM_TYPE_INT64 = 8,
3385    #[doc = "32-bit floating-point"]
3386    MAV_PARAM_TYPE_REAL32 = 9,
3387    #[doc = "64-bit floating-point"]
3388    MAV_PARAM_TYPE_REAL64 = 10,
3389}
3390impl MavParamType {
3391    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3392}
3393impl Default for MavParamType {
3394    fn default() -> Self {
3395        Self::DEFAULT
3396    }
3397}
3398bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3399impl MavPowerStatus {
3400    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3401}
3402impl Default for MavPowerStatus {
3403    fn default() -> Self {
3404        Self::DEFAULT
3405    }
3406}
3407bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3408impl MavProtocolCapability {
3409    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3410}
3411impl Default for MavProtocolCapability {
3412    fn default() -> Self {
3413        Self::DEFAULT
3414    }
3415}
3416#[cfg_attr(feature = "ts", derive(TS))]
3417#[cfg_attr(feature = "ts", ts(export))]
3418#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3420#[cfg_attr(feature = "serde", serde(tag = "type"))]
3421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3422#[repr(u32)]
3423#[doc = "Result from a MAVLink command (MAV_CMD)"]
3424pub enum MavResult {
3425    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3426    MAV_RESULT_ACCEPTED = 0,
3427    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3428    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3429    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3430    MAV_RESULT_DENIED = 2,
3431    #[doc = "Command is not supported (unknown)."]
3432    MAV_RESULT_UNSUPPORTED = 3,
3433    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3434    MAV_RESULT_FAILED = 4,
3435    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3436    MAV_RESULT_IN_PROGRESS = 5,
3437    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3438    MAV_RESULT_CANCELLED = 6,
3439    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3440    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3441    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3442    MAV_RESULT_COMMAND_INT_ONLY = 8,
3443    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3444    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3445}
3446impl MavResult {
3447    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3448}
3449impl Default for MavResult {
3450    fn default() -> Self {
3451        Self::DEFAULT
3452    }
3453}
3454#[cfg_attr(feature = "ts", derive(TS))]
3455#[cfg_attr(feature = "ts", ts(export))]
3456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3458#[cfg_attr(feature = "serde", serde(tag = "type"))]
3459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3460#[repr(u32)]
3461#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3462#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3463pub enum MavRoi {
3464    #[doc = "No region of interest."]
3465    MAV_ROI_NONE = 0,
3466    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3467    MAV_ROI_WPNEXT = 1,
3468    #[doc = "Point toward given waypoint."]
3469    MAV_ROI_WPINDEX = 2,
3470    #[doc = "Point toward fixed location."]
3471    MAV_ROI_LOCATION = 3,
3472    #[doc = "Point toward of given id."]
3473    MAV_ROI_TARGET = 4,
3474}
3475impl MavRoi {
3476    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3477}
3478impl Default for MavRoi {
3479    fn default() -> Self {
3480        Self::DEFAULT
3481    }
3482}
3483#[cfg_attr(feature = "ts", derive(TS))]
3484#[cfg_attr(feature = "ts", ts(export))]
3485#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3487#[cfg_attr(feature = "serde", serde(tag = "type"))]
3488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3489#[repr(u32)]
3490#[doc = "Enumeration of sensor orientation, according to its rotations"]
3491pub enum MavSensorOrientation {
3492    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3493    MAV_SENSOR_ROTATION_NONE = 0,
3494    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3495    MAV_SENSOR_ROTATION_YAW_45 = 1,
3496    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3497    MAV_SENSOR_ROTATION_YAW_90 = 2,
3498    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3499    MAV_SENSOR_ROTATION_YAW_135 = 3,
3500    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3501    MAV_SENSOR_ROTATION_YAW_180 = 4,
3502    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3503    MAV_SENSOR_ROTATION_YAW_225 = 5,
3504    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3505    MAV_SENSOR_ROTATION_YAW_270 = 6,
3506    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3507    MAV_SENSOR_ROTATION_YAW_315 = 7,
3508    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3509    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3510    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3511    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3512    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3513    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3514    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3515    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3516    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3517    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3518    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3519    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3520    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3521    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3522    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3523    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3524    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3525    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3526    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3527    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3528    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3529    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3530    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3531    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3532    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3533    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3534    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3535    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3536    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3537    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3538    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3539    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3540    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3541    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3542    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3543    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3544    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3545    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3546    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3547    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3548    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3549    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3550    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3551    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3552    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3553    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3554    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3555    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3556    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3557    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3558    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3559    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3560    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3561    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3562    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3563    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3564    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3565    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3566    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3567    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3568    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3569    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3570    #[doc = "Pitch: 315"]
3571    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3572    #[doc = "Roll: 90, Pitch: 315"]
3573    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3574    #[doc = "Custom orientation"]
3575    MAV_SENSOR_ROTATION_CUSTOM = 100,
3576}
3577impl MavSensorOrientation {
3578    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3579}
3580impl Default for MavSensorOrientation {
3581    fn default() -> Self {
3582        Self::DEFAULT
3583    }
3584}
3585#[cfg_attr(feature = "ts", derive(TS))]
3586#[cfg_attr(feature = "ts", ts(export))]
3587#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3589#[cfg_attr(feature = "serde", serde(tag = "type"))]
3590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3591#[repr(u32)]
3592#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3593pub enum MavSeverity {
3594    #[doc = "System is unusable. This is a \"panic\" condition."]
3595    MAV_SEVERITY_EMERGENCY = 0,
3596    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3597    MAV_SEVERITY_ALERT = 1,
3598    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3599    MAV_SEVERITY_CRITICAL = 2,
3600    #[doc = "Indicates an error in secondary/redundant systems."]
3601    MAV_SEVERITY_ERROR = 3,
3602    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3603    MAV_SEVERITY_WARNING = 4,
3604    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3605    MAV_SEVERITY_NOTICE = 5,
3606    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3607    MAV_SEVERITY_INFO = 6,
3608    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3609    MAV_SEVERITY_DEBUG = 7,
3610}
3611impl MavSeverity {
3612    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3613}
3614impl Default for MavSeverity {
3615    fn default() -> Self {
3616        Self::DEFAULT
3617    }
3618}
3619#[cfg_attr(feature = "ts", derive(TS))]
3620#[cfg_attr(feature = "ts", ts(export))]
3621#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3623#[cfg_attr(feature = "serde", serde(tag = "type"))]
3624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3625#[repr(u32)]
3626#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3627pub enum MavStandardMode {
3628    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3629    MAV_STANDARD_MODE_NON_STANDARD = 0,
3630    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3631    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3632    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3633    MAV_STANDARD_MODE_ORBIT = 2,
3634    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3635    MAV_STANDARD_MODE_CRUISE = 3,
3636    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3637    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3638    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3639    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3640    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3641    MAV_STANDARD_MODE_MISSION = 6,
3642    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3643    MAV_STANDARD_MODE_LAND = 7,
3644    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3645    MAV_STANDARD_MODE_TAKEOFF = 8,
3646}
3647impl MavStandardMode {
3648    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3649}
3650impl Default for MavStandardMode {
3651    fn default() -> Self {
3652        Self::DEFAULT
3653    }
3654}
3655#[cfg_attr(feature = "ts", derive(TS))]
3656#[cfg_attr(feature = "ts", ts(export))]
3657#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3659#[cfg_attr(feature = "serde", serde(tag = "type"))]
3660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3661#[repr(u32)]
3662pub enum MavState {
3663    #[doc = "Uninitialized system, state is unknown."]
3664    MAV_STATE_UNINIT = 0,
3665    #[doc = "System is booting up."]
3666    MAV_STATE_BOOT = 1,
3667    #[doc = "System is calibrating and not flight-ready."]
3668    MAV_STATE_CALIBRATING = 2,
3669    #[doc = "System is grounded and on standby. It can be launched any time."]
3670    MAV_STATE_STANDBY = 3,
3671    #[doc = "System is active and might be already airborne. Motors are engaged."]
3672    MAV_STATE_ACTIVE = 4,
3673    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3674    MAV_STATE_CRITICAL = 5,
3675    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3676    MAV_STATE_EMERGENCY = 6,
3677    #[doc = "System just initialized its power-down sequence, will shut down now."]
3678    MAV_STATE_POWEROFF = 7,
3679    #[doc = "System is terminating itself (failsafe or commanded)."]
3680    MAV_STATE_FLIGHT_TERMINATION = 8,
3681}
3682impl MavState {
3683    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3684}
3685impl Default for MavState {
3686    fn default() -> Self {
3687        Self::DEFAULT
3688    }
3689}
3690bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3691impl MavSysStatusSensor {
3692    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3693}
3694impl Default for MavSysStatusSensor {
3695    fn default() -> Self {
3696        Self::DEFAULT
3697    }
3698}
3699bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3700impl MavSysStatusSensorExtended {
3701    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3702}
3703impl Default for MavSysStatusSensorExtended {
3704    fn default() -> Self {
3705        Self::DEFAULT
3706    }
3707}
3708#[cfg_attr(feature = "ts", derive(TS))]
3709#[cfg_attr(feature = "ts", ts(export))]
3710#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3712#[cfg_attr(feature = "serde", serde(tag = "type"))]
3713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3714#[repr(u32)]
3715pub enum MavTunnelPayloadType {
3716    #[doc = "Encoding of payload unknown."]
3717    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3718    #[doc = "Registered for STorM32 gimbal controller."]
3719    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3720    #[doc = "Registered for STorM32 gimbal controller."]
3721    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3722    #[doc = "Registered for STorM32 gimbal controller."]
3723    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3724    #[doc = "Registered for STorM32 gimbal controller."]
3725    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3726    #[doc = "Registered for STorM32 gimbal controller."]
3727    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3728    #[doc = "Registered for STorM32 gimbal controller."]
3729    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3730    #[doc = "Registered for STorM32 gimbal controller."]
3731    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3732    #[doc = "Registered for STorM32 gimbal controller."]
3733    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3734    #[doc = "Registered for STorM32 gimbal controller."]
3735    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3736    #[doc = "Registered for STorM32 gimbal controller."]
3737    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3738    #[doc = "Registered for ModalAI remote OSD protocol."]
3739    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3740    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3741    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3742    #[doc = "Registered for ModalAI vendor use."]
3743    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3744}
3745impl MavTunnelPayloadType {
3746    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3747}
3748impl Default for MavTunnelPayloadType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3761pub enum MavType {
3762    #[doc = "Generic micro air vehicle"]
3763    MAV_TYPE_GENERIC = 0,
3764    #[doc = "Fixed wing aircraft."]
3765    MAV_TYPE_FIXED_WING = 1,
3766    #[doc = "Quadrotor"]
3767    MAV_TYPE_QUADROTOR = 2,
3768    #[doc = "Coaxial helicopter"]
3769    MAV_TYPE_COAXIAL = 3,
3770    #[doc = "Normal helicopter with tail rotor."]
3771    MAV_TYPE_HELICOPTER = 4,
3772    #[doc = "Ground installation"]
3773    MAV_TYPE_ANTENNA_TRACKER = 5,
3774    #[doc = "Operator control unit / ground control station"]
3775    MAV_TYPE_GCS = 6,
3776    #[doc = "Airship, controlled"]
3777    MAV_TYPE_AIRSHIP = 7,
3778    #[doc = "Free balloon, uncontrolled"]
3779    MAV_TYPE_FREE_BALLOON = 8,
3780    #[doc = "Rocket"]
3781    MAV_TYPE_ROCKET = 9,
3782    #[doc = "Ground rover"]
3783    MAV_TYPE_GROUND_ROVER = 10,
3784    #[doc = "Surface vessel, boat, ship"]
3785    MAV_TYPE_SURFACE_BOAT = 11,
3786    #[doc = "Submarine"]
3787    MAV_TYPE_SUBMARINE = 12,
3788    #[doc = "Hexarotor"]
3789    MAV_TYPE_HEXAROTOR = 13,
3790    #[doc = "Octorotor"]
3791    MAV_TYPE_OCTOROTOR = 14,
3792    #[doc = "Tricopter"]
3793    MAV_TYPE_TRICOPTER = 15,
3794    #[doc = "Flapping wing"]
3795    MAV_TYPE_FLAPPING_WING = 16,
3796    #[doc = "Kite"]
3797    MAV_TYPE_KITE = 17,
3798    #[doc = "Onboard companion controller"]
3799    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3800    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3801    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3802    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3803    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3804    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3805    MAV_TYPE_VTOL_TILTROTOR = 21,
3806    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3807    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3808    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3809    MAV_TYPE_VTOL_TAILSITTER = 23,
3810    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3811    MAV_TYPE_VTOL_TILTWING = 24,
3812    #[doc = "VTOL reserved 5"]
3813    MAV_TYPE_VTOL_RESERVED5 = 25,
3814    #[doc = "Gimbal"]
3815    MAV_TYPE_GIMBAL = 26,
3816    #[doc = "ADSB system"]
3817    MAV_TYPE_ADSB = 27,
3818    #[doc = "Steerable, nonrigid airfoil"]
3819    MAV_TYPE_PARAFOIL = 28,
3820    #[doc = "Dodecarotor"]
3821    MAV_TYPE_DODECAROTOR = 29,
3822    #[doc = "Camera"]
3823    MAV_TYPE_CAMERA = 30,
3824    #[doc = "Charging station"]
3825    MAV_TYPE_CHARGING_STATION = 31,
3826    #[doc = "FLARM collision avoidance system"]
3827    MAV_TYPE_FLARM = 32,
3828    #[doc = "Servo"]
3829    MAV_TYPE_SERVO = 33,
3830    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3831    MAV_TYPE_ODID = 34,
3832    #[doc = "Decarotor"]
3833    MAV_TYPE_DECAROTOR = 35,
3834    #[doc = "Battery"]
3835    MAV_TYPE_BATTERY = 36,
3836    #[doc = "Parachute"]
3837    MAV_TYPE_PARACHUTE = 37,
3838    #[doc = "Log"]
3839    MAV_TYPE_LOG = 38,
3840    #[doc = "OSD"]
3841    MAV_TYPE_OSD = 39,
3842    #[doc = "IMU"]
3843    MAV_TYPE_IMU = 40,
3844    #[doc = "GPS"]
3845    MAV_TYPE_GPS = 41,
3846    #[doc = "Winch"]
3847    MAV_TYPE_WINCH = 42,
3848    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3849    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3850    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3851    MAV_TYPE_ILLUMINATOR = 44,
3852    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3853    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3854}
3855impl MavType {
3856    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3857}
3858impl Default for MavType {
3859    fn default() -> Self {
3860        Self::DEFAULT
3861    }
3862}
3863#[cfg_attr(feature = "ts", derive(TS))]
3864#[cfg_attr(feature = "ts", ts(export))]
3865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3867#[cfg_attr(feature = "serde", serde(tag = "type"))]
3868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3869#[repr(u32)]
3870#[doc = "Enumeration of VTOL states"]
3871pub enum MavVtolState {
3872    #[doc = "MAV is not configured as VTOL"]
3873    MAV_VTOL_STATE_UNDEFINED = 0,
3874    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3875    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3876    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3877    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3878    #[doc = "VTOL is in multicopter state"]
3879    MAV_VTOL_STATE_MC = 3,
3880    #[doc = "VTOL is in fixed-wing state"]
3881    MAV_VTOL_STATE_FW = 4,
3882}
3883impl MavVtolState {
3884    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3885}
3886impl Default for MavVtolState {
3887    fn default() -> Self {
3888        Self::DEFAULT
3889    }
3890}
3891bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3892impl MavWinchStatusFlag {
3893    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3894}
3895impl Default for MavWinchStatusFlag {
3896    fn default() -> Self {
3897        Self::DEFAULT
3898    }
3899}
3900#[cfg_attr(feature = "ts", derive(TS))]
3901#[cfg_attr(feature = "ts", ts(export))]
3902#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3904#[cfg_attr(feature = "serde", serde(tag = "type"))]
3905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3906#[repr(u32)]
3907pub enum MavlinkDataStreamType {
3908    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3909    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3910    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3911    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3912    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3913    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3914}
3915impl MavlinkDataStreamType {
3916    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3917}
3918impl Default for MavlinkDataStreamType {
3919    fn default() -> Self {
3920        Self::DEFAULT
3921    }
3922}
3923#[cfg_attr(feature = "ts", derive(TS))]
3924#[cfg_attr(feature = "ts", ts(export))]
3925#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3927#[cfg_attr(feature = "serde", serde(tag = "type"))]
3928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3929#[repr(u32)]
3930#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3931pub enum MissionState {
3932    #[doc = "The mission status reporting is not supported."]
3933    MISSION_STATE_UNKNOWN = 0,
3934    #[doc = "No mission on the vehicle."]
3935    MISSION_STATE_NO_MISSION = 1,
3936    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3937    MISSION_STATE_NOT_STARTED = 2,
3938    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3939    MISSION_STATE_ACTIVE = 3,
3940    #[doc = "Mission is paused when in auto mode."]
3941    MISSION_STATE_PAUSED = 4,
3942    #[doc = "Mission has executed all mission items."]
3943    MISSION_STATE_COMPLETE = 5,
3944}
3945impl MissionState {
3946    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3947}
3948impl Default for MissionState {
3949    fn default() -> Self {
3950        Self::DEFAULT
3951    }
3952}
3953#[cfg_attr(feature = "ts", derive(TS))]
3954#[cfg_attr(feature = "ts", ts(export))]
3955#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3957#[cfg_attr(feature = "serde", serde(tag = "type"))]
3958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3959#[repr(u32)]
3960#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3961pub enum MotorTestOrder {
3962    #[doc = "Default autopilot motor test method."]
3963    MOTOR_TEST_ORDER_DEFAULT = 0,
3964    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3965    MOTOR_TEST_ORDER_SEQUENCE = 1,
3966    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3967    MOTOR_TEST_ORDER_BOARD = 2,
3968}
3969impl MotorTestOrder {
3970    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3971}
3972impl Default for MotorTestOrder {
3973    fn default() -> Self {
3974        Self::DEFAULT
3975    }
3976}
3977#[cfg_attr(feature = "ts", derive(TS))]
3978#[cfg_attr(feature = "ts", ts(export))]
3979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3981#[cfg_attr(feature = "serde", serde(tag = "type"))]
3982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3983#[repr(u32)]
3984#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3985pub enum MotorTestThrottleType {
3986    #[doc = "Throttle as a percentage (0 ~ 100)"]
3987    MOTOR_TEST_THROTTLE_PERCENT = 0,
3988    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3989    MOTOR_TEST_THROTTLE_PWM = 1,
3990    #[doc = "Throttle pass-through from pilot's transmitter."]
3991    MOTOR_TEST_THROTTLE_PILOT = 2,
3992    #[doc = "Per-motor compass calibration test."]
3993    MOTOR_TEST_COMPASS_CAL = 3,
3994}
3995impl MotorTestThrottleType {
3996    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3997}
3998impl Default for MotorTestThrottleType {
3999    fn default() -> Self {
4000        Self::DEFAULT
4001    }
4002}
4003#[cfg_attr(feature = "ts", derive(TS))]
4004#[cfg_attr(feature = "ts", ts(export))]
4005#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4007#[cfg_attr(feature = "serde", serde(tag = "type"))]
4008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4009#[repr(u32)]
4010pub enum NavVtolLandOptions {
4011    #[doc = "Default autopilot landing behaviour."]
4012    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4013    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4014    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4015    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4016    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4017}
4018impl NavVtolLandOptions {
4019    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4020}
4021impl Default for NavVtolLandOptions {
4022    fn default() -> Self {
4023        Self::DEFAULT
4024    }
4025}
4026#[cfg_attr(feature = "ts", derive(TS))]
4027#[cfg_attr(feature = "ts", ts(export))]
4028#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4030#[cfg_attr(feature = "serde", serde(tag = "type"))]
4031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4032#[repr(u32)]
4033#[doc = "Yaw behaviour during orbit flight."]
4034pub enum OrbitYawBehaviour {
4035    #[doc = "Vehicle front points to the center (default)."]
4036    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4037    #[doc = "Vehicle front holds heading when message received."]
4038    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4039    #[doc = "Yaw uncontrolled."]
4040    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4041    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4042    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4043    #[doc = "Yaw controlled by RC input."]
4044    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4045    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4046    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4047}
4048impl OrbitYawBehaviour {
4049    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4050}
4051impl Default for OrbitYawBehaviour {
4052    fn default() -> Self {
4053        Self::DEFAULT
4054    }
4055}
4056#[cfg_attr(feature = "ts", derive(TS))]
4057#[cfg_attr(feature = "ts", ts(export))]
4058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4060#[cfg_attr(feature = "serde", serde(tag = "type"))]
4061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4062#[repr(u32)]
4063#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4064pub enum ParachuteAction {
4065    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4066    PARACHUTE_DISABLE = 0,
4067    #[doc = "Enable auto-release of parachute."]
4068    PARACHUTE_ENABLE = 1,
4069    #[doc = "Release parachute and kill motors."]
4070    PARACHUTE_RELEASE = 2,
4071}
4072impl ParachuteAction {
4073    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4074}
4075impl Default for ParachuteAction {
4076    fn default() -> Self {
4077        Self::DEFAULT
4078    }
4079}
4080#[cfg_attr(feature = "ts", derive(TS))]
4081#[cfg_attr(feature = "ts", ts(export))]
4082#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4084#[cfg_attr(feature = "serde", serde(tag = "type"))]
4085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4086#[repr(u32)]
4087#[doc = "Result from PARAM_EXT_SET message."]
4088pub enum ParamAck {
4089    #[doc = "Parameter value ACCEPTED and SET"]
4090    PARAM_ACK_ACCEPTED = 0,
4091    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4092    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4093    #[doc = "Parameter failed to set"]
4094    PARAM_ACK_FAILED = 2,
4095    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4096    PARAM_ACK_IN_PROGRESS = 3,
4097}
4098impl ParamAck {
4099    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4100}
4101impl Default for ParamAck {
4102    fn default() -> Self {
4103        Self::DEFAULT
4104    }
4105}
4106bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4107impl PositionTargetTypemask {
4108    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4109}
4110impl Default for PositionTargetTypemask {
4111    fn default() -> Self {
4112        Self::DEFAULT
4113    }
4114}
4115#[cfg_attr(feature = "ts", derive(TS))]
4116#[cfg_attr(feature = "ts", ts(export))]
4117#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4119#[cfg_attr(feature = "serde", serde(tag = "type"))]
4120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4121#[repr(u32)]
4122#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4123pub enum PrecisionLandMode {
4124    #[doc = "Normal (non-precision) landing."]
4125    PRECISION_LAND_MODE_DISABLED = 0,
4126    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4127    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4128    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4129    PRECISION_LAND_MODE_REQUIRED = 2,
4130}
4131impl PrecisionLandMode {
4132    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4133}
4134impl Default for PrecisionLandMode {
4135    fn default() -> Self {
4136        Self::DEFAULT
4137    }
4138}
4139#[cfg_attr(feature = "ts", derive(TS))]
4140#[cfg_attr(feature = "ts", ts(export))]
4141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4143#[cfg_attr(feature = "serde", serde(tag = "type"))]
4144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4145#[repr(u32)]
4146#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4147pub enum PreflightStorageMissionAction {
4148    #[doc = "Read current mission data from persistent storage"]
4149    MISSION_READ_PERSISTENT = 0,
4150    #[doc = "Write current mission data to persistent storage"]
4151    MISSION_WRITE_PERSISTENT = 1,
4152    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4153    MISSION_RESET_DEFAULT = 2,
4154}
4155impl PreflightStorageMissionAction {
4156    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4157}
4158impl Default for PreflightStorageMissionAction {
4159    fn default() -> Self {
4160        Self::DEFAULT
4161    }
4162}
4163#[cfg_attr(feature = "ts", derive(TS))]
4164#[cfg_attr(feature = "ts", ts(export))]
4165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4167#[cfg_attr(feature = "serde", serde(tag = "type"))]
4168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4169#[repr(u32)]
4170#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4171pub enum PreflightStorageParameterAction {
4172    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4173    PARAM_READ_PERSISTENT = 0,
4174    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4175    PARAM_WRITE_PERSISTENT = 1,
4176    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4177    PARAM_RESET_CONFIG_DEFAULT = 2,
4178    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4179    PARAM_RESET_SENSOR_DEFAULT = 3,
4180    #[doc = "Reset all parameters, including operation counters, to default values"]
4181    PARAM_RESET_ALL_DEFAULT = 4,
4182}
4183impl PreflightStorageParameterAction {
4184    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4185}
4186impl Default for PreflightStorageParameterAction {
4187    fn default() -> Self {
4188        Self::DEFAULT
4189    }
4190}
4191#[cfg_attr(feature = "ts", derive(TS))]
4192#[cfg_attr(feature = "ts", ts(export))]
4193#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4195#[cfg_attr(feature = "serde", serde(tag = "type"))]
4196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4197#[repr(u32)]
4198#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4199pub enum RcSubType {
4200    #[doc = "Spektrum DSM2"]
4201    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4202    #[doc = "Spektrum DSMX"]
4203    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4204    #[doc = "Spektrum DSMX8"]
4205    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4206}
4207impl RcSubType {
4208    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4209}
4210impl Default for RcSubType {
4211    fn default() -> Self {
4212        Self::DEFAULT
4213    }
4214}
4215#[cfg_attr(feature = "ts", derive(TS))]
4216#[cfg_attr(feature = "ts", ts(export))]
4217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4219#[cfg_attr(feature = "serde", serde(tag = "type"))]
4220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4221#[repr(u32)]
4222#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4223pub enum RcType {
4224    #[doc = "Spektrum"]
4225    RC_TYPE_SPEKTRUM = 0,
4226    #[doc = "CRSF"]
4227    RC_TYPE_CRSF = 1,
4228}
4229impl RcType {
4230    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4231}
4232impl Default for RcType {
4233    fn default() -> Self {
4234        Self::DEFAULT
4235    }
4236}
4237#[cfg_attr(feature = "ts", derive(TS))]
4238#[cfg_attr(feature = "ts", ts(export))]
4239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4241#[cfg_attr(feature = "serde", serde(tag = "type"))]
4242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4243#[repr(u32)]
4244#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4245pub enum RebootShutdownConditions {
4246    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4247    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4248    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4249    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4250}
4251impl RebootShutdownConditions {
4252    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4253}
4254impl Default for RebootShutdownConditions {
4255    fn default() -> Self {
4256        Self::DEFAULT
4257    }
4258}
4259#[cfg_attr(feature = "ts", derive(TS))]
4260#[cfg_attr(feature = "ts", ts(export))]
4261#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4263#[cfg_attr(feature = "serde", serde(tag = "type"))]
4264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4265#[repr(u32)]
4266#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4267pub enum RtkBaselineCoordinateSystem {
4268    #[doc = "Earth-centered, Earth-fixed"]
4269    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4270    #[doc = "RTK basestation centered, north, east, down"]
4271    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4272}
4273impl RtkBaselineCoordinateSystem {
4274    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4275}
4276impl Default for RtkBaselineCoordinateSystem {
4277    fn default() -> Self {
4278        Self::DEFAULT
4279    }
4280}
4281#[cfg_attr(feature = "ts", derive(TS))]
4282#[cfg_attr(feature = "ts", ts(export))]
4283#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4285#[cfg_attr(feature = "serde", serde(tag = "type"))]
4286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4287#[repr(u32)]
4288#[doc = "Possible safety switch states."]
4289pub enum SafetySwitchState {
4290    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4291    SAFETY_SWITCH_STATE_SAFE = 0,
4292    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4293    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4294}
4295impl SafetySwitchState {
4296    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4297}
4298impl Default for SafetySwitchState {
4299    fn default() -> Self {
4300        Self::DEFAULT
4301    }
4302}
4303#[cfg_attr(feature = "ts", derive(TS))]
4304#[cfg_attr(feature = "ts", ts(export))]
4305#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4307#[cfg_attr(feature = "serde", serde(tag = "type"))]
4308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4309#[repr(u32)]
4310#[doc = "SERIAL_CONTROL device types"]
4311pub enum SerialControlDev {
4312    #[doc = "First telemetry port"]
4313    SERIAL_CONTROL_DEV_TELEM1 = 0,
4314    #[doc = "Second telemetry port"]
4315    SERIAL_CONTROL_DEV_TELEM2 = 1,
4316    #[doc = "First GPS port"]
4317    SERIAL_CONTROL_DEV_GPS1 = 2,
4318    #[doc = "Second GPS port"]
4319    SERIAL_CONTROL_DEV_GPS2 = 3,
4320    #[doc = "system shell"]
4321    SERIAL_CONTROL_DEV_SHELL = 10,
4322    #[doc = "SERIAL0"]
4323    SERIAL_CONTROL_SERIAL0 = 100,
4324    #[doc = "SERIAL1"]
4325    SERIAL_CONTROL_SERIAL1 = 101,
4326    #[doc = "SERIAL2"]
4327    SERIAL_CONTROL_SERIAL2 = 102,
4328    #[doc = "SERIAL3"]
4329    SERIAL_CONTROL_SERIAL3 = 103,
4330    #[doc = "SERIAL4"]
4331    SERIAL_CONTROL_SERIAL4 = 104,
4332    #[doc = "SERIAL5"]
4333    SERIAL_CONTROL_SERIAL5 = 105,
4334    #[doc = "SERIAL6"]
4335    SERIAL_CONTROL_SERIAL6 = 106,
4336    #[doc = "SERIAL7"]
4337    SERIAL_CONTROL_SERIAL7 = 107,
4338    #[doc = "SERIAL8"]
4339    SERIAL_CONTROL_SERIAL8 = 108,
4340    #[doc = "SERIAL9"]
4341    SERIAL_CONTROL_SERIAL9 = 109,
4342}
4343impl SerialControlDev {
4344    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4345}
4346impl Default for SerialControlDev {
4347    fn default() -> Self {
4348        Self::DEFAULT
4349    }
4350}
4351bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4352impl SerialControlFlag {
4353    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4354}
4355impl Default for SerialControlFlag {
4356    fn default() -> Self {
4357        Self::DEFAULT
4358    }
4359}
4360#[cfg_attr(feature = "ts", derive(TS))]
4361#[cfg_attr(feature = "ts", ts(export))]
4362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4364#[cfg_attr(feature = "serde", serde(tag = "type"))]
4365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4366#[repr(u32)]
4367#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4368pub enum SetFocusType {
4369    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4370    FOCUS_TYPE_STEP = 0,
4371    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4372    FOCUS_TYPE_CONTINUOUS = 1,
4373    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4374    FOCUS_TYPE_RANGE = 2,
4375    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4376    FOCUS_TYPE_METERS = 3,
4377    #[doc = "Focus automatically."]
4378    FOCUS_TYPE_AUTO = 4,
4379    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4380    FOCUS_TYPE_AUTO_SINGLE = 5,
4381    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4382    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4383}
4384impl SetFocusType {
4385    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4386}
4387impl Default for SetFocusType {
4388    fn default() -> Self {
4389        Self::DEFAULT
4390    }
4391}
4392#[cfg_attr(feature = "ts", derive(TS))]
4393#[cfg_attr(feature = "ts", ts(export))]
4394#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4396#[cfg_attr(feature = "serde", serde(tag = "type"))]
4397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4398#[repr(u32)]
4399#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4400pub enum SpeedType {
4401    #[doc = "Airspeed"]
4402    SPEED_TYPE_AIRSPEED = 0,
4403    #[doc = "Groundspeed"]
4404    SPEED_TYPE_GROUNDSPEED = 1,
4405    #[doc = "Climb speed"]
4406    SPEED_TYPE_CLIMB_SPEED = 2,
4407    #[doc = "Descent speed"]
4408    SPEED_TYPE_DESCENT_SPEED = 3,
4409}
4410impl SpeedType {
4411    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4412}
4413impl Default for SpeedType {
4414    fn default() -> Self {
4415        Self::DEFAULT
4416    }
4417}
4418#[cfg_attr(feature = "ts", derive(TS))]
4419#[cfg_attr(feature = "ts", ts(export))]
4420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4422#[cfg_attr(feature = "serde", serde(tag = "type"))]
4423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4424#[repr(u32)]
4425#[doc = "Flags to indicate the status of camera storage."]
4426pub enum StorageStatus {
4427    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4428    STORAGE_STATUS_EMPTY = 0,
4429    #[doc = "Storage present but unformatted."]
4430    STORAGE_STATUS_UNFORMATTED = 1,
4431    #[doc = "Storage present and ready."]
4432    STORAGE_STATUS_READY = 2,
4433    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4434    STORAGE_STATUS_NOT_SUPPORTED = 3,
4435}
4436impl StorageStatus {
4437    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4438}
4439impl Default for StorageStatus {
4440    fn default() -> Self {
4441        Self::DEFAULT
4442    }
4443}
4444#[cfg_attr(feature = "ts", derive(TS))]
4445#[cfg_attr(feature = "ts", ts(export))]
4446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4448#[cfg_attr(feature = "serde", serde(tag = "type"))]
4449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4450#[repr(u32)]
4451#[doc = "Flags to indicate the type of storage."]
4452pub enum StorageType {
4453    #[doc = "Storage type is not known."]
4454    STORAGE_TYPE_UNKNOWN = 0,
4455    #[doc = "Storage type is USB device."]
4456    STORAGE_TYPE_USB_STICK = 1,
4457    #[doc = "Storage type is SD card."]
4458    STORAGE_TYPE_SD = 2,
4459    #[doc = "Storage type is microSD card."]
4460    STORAGE_TYPE_MICROSD = 3,
4461    #[doc = "Storage type is CFast."]
4462    STORAGE_TYPE_CF = 4,
4463    #[doc = "Storage type is CFexpress."]
4464    STORAGE_TYPE_CFE = 5,
4465    #[doc = "Storage type is XQD."]
4466    STORAGE_TYPE_XQD = 6,
4467    #[doc = "Storage type is HD mass storage type."]
4468    STORAGE_TYPE_HD = 7,
4469    #[doc = "Storage type is other, not listed type."]
4470    STORAGE_TYPE_OTHER = 254,
4471}
4472impl StorageType {
4473    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4474}
4475impl Default for StorageType {
4476    fn default() -> Self {
4477        Self::DEFAULT
4478    }
4479}
4480bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4481impl StorageUsageFlag {
4482    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4483}
4484impl Default for StorageUsageFlag {
4485    fn default() -> Self {
4486        Self::DEFAULT
4487    }
4488}
4489#[cfg_attr(feature = "ts", derive(TS))]
4490#[cfg_attr(feature = "ts", ts(export))]
4491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4493#[cfg_attr(feature = "serde", serde(tag = "type"))]
4494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4495#[repr(u32)]
4496#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4497pub enum TuneFormat {
4498    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4499    TUNE_FORMAT_QBASIC1_1 = 1,
4500    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4501    TUNE_FORMAT_MML_MODERN = 2,
4502}
4503impl TuneFormat {
4504    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4505}
4506impl Default for TuneFormat {
4507    fn default() -> Self {
4508        Self::DEFAULT
4509    }
4510}
4511#[cfg_attr(feature = "ts", derive(TS))]
4512#[cfg_attr(feature = "ts", ts(export))]
4513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4515#[cfg_attr(feature = "serde", serde(tag = "type"))]
4516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4517#[repr(u32)]
4518#[doc = "Generalized UAVCAN node health"]
4519pub enum UavcanNodeHealth {
4520    #[doc = "The node is functioning properly."]
4521    UAVCAN_NODE_HEALTH_OK = 0,
4522    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4523    UAVCAN_NODE_HEALTH_WARNING = 1,
4524    #[doc = "The node has encountered a major failure."]
4525    UAVCAN_NODE_HEALTH_ERROR = 2,
4526    #[doc = "The node has suffered a fatal malfunction."]
4527    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4528}
4529impl UavcanNodeHealth {
4530    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4531}
4532impl Default for UavcanNodeHealth {
4533    fn default() -> Self {
4534        Self::DEFAULT
4535    }
4536}
4537#[cfg_attr(feature = "ts", derive(TS))]
4538#[cfg_attr(feature = "ts", ts(export))]
4539#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4541#[cfg_attr(feature = "serde", serde(tag = "type"))]
4542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4543#[repr(u32)]
4544#[doc = "Generalized UAVCAN node mode"]
4545pub enum UavcanNodeMode {
4546    #[doc = "The node is performing its primary functions."]
4547    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4548    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4549    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4550    #[doc = "The node is under maintenance."]
4551    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4552    #[doc = "The node is in the process of updating its software."]
4553    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4554    #[doc = "The node is no longer available online."]
4555    UAVCAN_NODE_MODE_OFFLINE = 7,
4556}
4557impl UavcanNodeMode {
4558    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4559}
4560impl Default for UavcanNodeMode {
4561    fn default() -> Self {
4562        Self::DEFAULT
4563    }
4564}
4565bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4566impl UtmDataAvailFlags {
4567    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4568}
4569impl Default for UtmDataAvailFlags {
4570    fn default() -> Self {
4571        Self::DEFAULT
4572    }
4573}
4574#[cfg_attr(feature = "ts", derive(TS))]
4575#[cfg_attr(feature = "ts", ts(export))]
4576#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4578#[cfg_attr(feature = "serde", serde(tag = "type"))]
4579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4580#[repr(u32)]
4581#[doc = "Airborne status of UAS."]
4582pub enum UtmFlightState {
4583    #[doc = "The flight state can't be determined."]
4584    UTM_FLIGHT_STATE_UNKNOWN = 1,
4585    #[doc = "UAS on ground."]
4586    UTM_FLIGHT_STATE_GROUND = 2,
4587    #[doc = "UAS airborne."]
4588    UTM_FLIGHT_STATE_AIRBORNE = 3,
4589    #[doc = "UAS is in an emergency flight state."]
4590    UTM_FLIGHT_STATE_EMERGENCY = 16,
4591    #[doc = "UAS has no active controls."]
4592    UTM_FLIGHT_STATE_NOCTRL = 32,
4593}
4594impl UtmFlightState {
4595    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4596}
4597impl Default for UtmFlightState {
4598    fn default() -> Self {
4599        Self::DEFAULT
4600    }
4601}
4602#[cfg_attr(feature = "ts", derive(TS))]
4603#[cfg_attr(feature = "ts", ts(export))]
4604#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4606#[cfg_attr(feature = "serde", serde(tag = "type"))]
4607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4608#[repr(u32)]
4609#[doc = "Video stream encodings"]
4610pub enum VideoStreamEncoding {
4611    #[doc = "Stream encoding is unknown"]
4612    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4613    #[doc = "Stream encoding is H.264"]
4614    VIDEO_STREAM_ENCODING_H264 = 1,
4615    #[doc = "Stream encoding is H.265"]
4616    VIDEO_STREAM_ENCODING_H265 = 2,
4617}
4618impl VideoStreamEncoding {
4619    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4620}
4621impl Default for VideoStreamEncoding {
4622    fn default() -> Self {
4623        Self::DEFAULT
4624    }
4625}
4626bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4627impl VideoStreamStatusFlags {
4628    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4629}
4630impl Default for VideoStreamStatusFlags {
4631    fn default() -> Self {
4632        Self::DEFAULT
4633    }
4634}
4635#[cfg_attr(feature = "ts", derive(TS))]
4636#[cfg_attr(feature = "ts", ts(export))]
4637#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4639#[cfg_attr(feature = "serde", serde(tag = "type"))]
4640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4641#[repr(u32)]
4642#[doc = "Video stream types"]
4643pub enum VideoStreamType {
4644    #[doc = "Stream is RTSP"]
4645    VIDEO_STREAM_TYPE_RTSP = 0,
4646    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4647    VIDEO_STREAM_TYPE_RTPUDP = 1,
4648    #[doc = "Stream is MPEG on TCP"]
4649    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4650    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4651    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4652}
4653impl VideoStreamType {
4654    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4655}
4656impl Default for VideoStreamType {
4657    fn default() -> Self {
4658        Self::DEFAULT
4659    }
4660}
4661#[cfg_attr(feature = "ts", derive(TS))]
4662#[cfg_attr(feature = "ts", ts(export))]
4663#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4665#[cfg_attr(feature = "serde", serde(tag = "type"))]
4666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4667#[repr(u32)]
4668#[doc = "Direction of VTOL transition"]
4669pub enum VtolTransitionHeading {
4670    #[doc = "Respect the heading configuration of the vehicle."]
4671    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4672    #[doc = "Use the heading pointing towards the next waypoint."]
4673    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4674    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4675    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4676    #[doc = "Use the specified heading in parameter 4."]
4677    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4678    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4679    VTOL_TRANSITION_HEADING_ANY = 4,
4680}
4681impl VtolTransitionHeading {
4682    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4683}
4684impl Default for VtolTransitionHeading {
4685    fn default() -> Self {
4686        Self::DEFAULT
4687    }
4688}
4689#[cfg_attr(feature = "ts", derive(TS))]
4690#[cfg_attr(feature = "ts", ts(export))]
4691#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4693#[cfg_attr(feature = "serde", serde(tag = "type"))]
4694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4695#[repr(u32)]
4696#[doc = "WiFi Mode."]
4697pub enum WifiConfigApMode {
4698    #[doc = "WiFi mode is undefined."]
4699    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4700    #[doc = "WiFi configured as an access point."]
4701    WIFI_CONFIG_AP_MODE_AP = 1,
4702    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4703    WIFI_CONFIG_AP_MODE_STATION = 2,
4704    #[doc = "WiFi disabled."]
4705    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4706}
4707impl WifiConfigApMode {
4708    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4709}
4710impl Default for WifiConfigApMode {
4711    fn default() -> Self {
4712        Self::DEFAULT
4713    }
4714}
4715#[cfg_attr(feature = "ts", derive(TS))]
4716#[cfg_attr(feature = "ts", ts(export))]
4717#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4719#[cfg_attr(feature = "serde", serde(tag = "type"))]
4720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4721#[repr(u32)]
4722#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4723pub enum WifiConfigApResponse {
4724    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4725    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4726    #[doc = "Changes accepted."]
4727    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4728    #[doc = "Changes rejected."]
4729    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4730    #[doc = "Invalid Mode."]
4731    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4732    #[doc = "Invalid SSID."]
4733    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4734    #[doc = "Invalid Password."]
4735    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4736}
4737impl WifiConfigApResponse {
4738    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4739}
4740impl Default for WifiConfigApResponse {
4741    fn default() -> Self {
4742        Self::DEFAULT
4743    }
4744}
4745#[cfg_attr(feature = "ts", derive(TS))]
4746#[cfg_attr(feature = "ts", ts(export))]
4747#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4749#[cfg_attr(feature = "serde", serde(tag = "type"))]
4750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4751#[repr(u32)]
4752#[doc = "Winch actions."]
4753pub enum WinchActions {
4754    #[doc = "Allow motor to freewheel."]
4755    WINCH_RELAXED = 0,
4756    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4757    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4758    #[doc = "Wind or unwind line at specified rate."]
4759    WINCH_RATE_CONTROL = 2,
4760    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4761    WINCH_LOCK = 3,
4762    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4763    WINCH_DELIVER = 4,
4764    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4765    WINCH_HOLD = 5,
4766    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4767    WINCH_RETRACT = 6,
4768    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4769    WINCH_LOAD_LINE = 7,
4770    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4771    WINCH_ABANDON_LINE = 8,
4772    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4773    WINCH_LOAD_PAYLOAD = 9,
4774}
4775impl WinchActions {
4776    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4777}
4778impl Default for WinchActions {
4779    fn default() -> Self {
4780        Self::DEFAULT
4781    }
4782}
4783#[doc = "Set the vehicle attitude and body angular rates."]
4784#[doc = ""]
4785#[doc = "ID: 140"]
4786#[derive(Debug, Clone, PartialEq)]
4787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4789#[cfg_attr(feature = "ts", derive(TS))]
4790#[cfg_attr(feature = "ts", ts(export))]
4791pub struct ACTUATOR_CONTROL_TARGET_DATA {
4792    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4793    pub time_usec: u64,
4794    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4795    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4796    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4797    pub controls: [f32; 8],
4798    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4799    pub group_mlx: u8,
4800}
4801impl ACTUATOR_CONTROL_TARGET_DATA {
4802    pub const ENCODED_LEN: usize = 41usize;
4803    pub const DEFAULT: Self = Self {
4804        time_usec: 0_u64,
4805        controls: [0.0_f32; 8usize],
4806        group_mlx: 0_u8,
4807    };
4808    #[cfg(feature = "arbitrary")]
4809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4810        use arbitrary::{Arbitrary, Unstructured};
4811        let mut buf = [0u8; 1024];
4812        rng.fill_bytes(&mut buf);
4813        let mut unstructured = Unstructured::new(&buf);
4814        Self::arbitrary(&mut unstructured).unwrap_or_default()
4815    }
4816}
4817impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4818    fn default() -> Self {
4819        Self::DEFAULT.clone()
4820    }
4821}
4822impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4823    type Message = MavMessage;
4824    const ID: u32 = 140u32;
4825    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4826    const EXTRA_CRC: u8 = 181u8;
4827    const ENCODED_LEN: usize = 41usize;
4828    fn deser(
4829        _version: MavlinkVersion,
4830        __input: &[u8],
4831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4832        let avail_len = __input.len();
4833        let mut payload_buf = [0; Self::ENCODED_LEN];
4834        let mut buf = if avail_len < Self::ENCODED_LEN {
4835            payload_buf[0..avail_len].copy_from_slice(__input);
4836            Bytes::new(&payload_buf)
4837        } else {
4838            Bytes::new(__input)
4839        };
4840        let mut __struct = Self::default();
4841        __struct.time_usec = buf.get_u64_le()?;
4842        for v in &mut __struct.controls {
4843            let val = buf.get_f32_le()?;
4844            *v = val;
4845        }
4846        __struct.group_mlx = buf.get_u8()?;
4847        Ok(__struct)
4848    }
4849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4850        let mut __tmp = BytesMut::new(bytes);
4851        #[allow(clippy::absurd_extreme_comparisons)]
4852        #[allow(unused_comparisons)]
4853        if __tmp.remaining() < Self::ENCODED_LEN {
4854            panic!(
4855                "buffer is too small (need {} bytes, but got {})",
4856                Self::ENCODED_LEN,
4857                __tmp.remaining(),
4858            )
4859        }
4860        __tmp.put_u64_le(self.time_usec);
4861        for val in &self.controls {
4862            __tmp.put_f32_le(*val);
4863        }
4864        __tmp.put_u8(self.group_mlx);
4865        if matches!(version, MavlinkVersion::V2) {
4866            let len = __tmp.len();
4867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4868        } else {
4869            __tmp.len()
4870        }
4871    }
4872}
4873#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4874#[doc = ""]
4875#[doc = "ID: 375"]
4876#[derive(Debug, Clone, PartialEq)]
4877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4879#[cfg_attr(feature = "ts", derive(TS))]
4880#[cfg_attr(feature = "ts", ts(export))]
4881pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4882    #[doc = "Timestamp (since system boot)."]
4883    pub time_usec: u64,
4884    #[doc = "Active outputs"]
4885    pub active: u32,
4886    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4888    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4889    pub actuator: [f32; 32],
4890}
4891impl ACTUATOR_OUTPUT_STATUS_DATA {
4892    pub const ENCODED_LEN: usize = 140usize;
4893    pub const DEFAULT: Self = Self {
4894        time_usec: 0_u64,
4895        active: 0_u32,
4896        actuator: [0.0_f32; 32usize],
4897    };
4898    #[cfg(feature = "arbitrary")]
4899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4900        use arbitrary::{Arbitrary, Unstructured};
4901        let mut buf = [0u8; 1024];
4902        rng.fill_bytes(&mut buf);
4903        let mut unstructured = Unstructured::new(&buf);
4904        Self::arbitrary(&mut unstructured).unwrap_or_default()
4905    }
4906}
4907impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4908    fn default() -> Self {
4909        Self::DEFAULT.clone()
4910    }
4911}
4912impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4913    type Message = MavMessage;
4914    const ID: u32 = 375u32;
4915    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4916    const EXTRA_CRC: u8 = 251u8;
4917    const ENCODED_LEN: usize = 140usize;
4918    fn deser(
4919        _version: MavlinkVersion,
4920        __input: &[u8],
4921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4922        let avail_len = __input.len();
4923        let mut payload_buf = [0; Self::ENCODED_LEN];
4924        let mut buf = if avail_len < Self::ENCODED_LEN {
4925            payload_buf[0..avail_len].copy_from_slice(__input);
4926            Bytes::new(&payload_buf)
4927        } else {
4928            Bytes::new(__input)
4929        };
4930        let mut __struct = Self::default();
4931        __struct.time_usec = buf.get_u64_le()?;
4932        __struct.active = buf.get_u32_le()?;
4933        for v in &mut __struct.actuator {
4934            let val = buf.get_f32_le()?;
4935            *v = val;
4936        }
4937        Ok(__struct)
4938    }
4939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4940        let mut __tmp = BytesMut::new(bytes);
4941        #[allow(clippy::absurd_extreme_comparisons)]
4942        #[allow(unused_comparisons)]
4943        if __tmp.remaining() < Self::ENCODED_LEN {
4944            panic!(
4945                "buffer is too small (need {} bytes, but got {})",
4946                Self::ENCODED_LEN,
4947                __tmp.remaining(),
4948            )
4949        }
4950        __tmp.put_u64_le(self.time_usec);
4951        __tmp.put_u32_le(self.active);
4952        for val in &self.actuator {
4953            __tmp.put_f32_le(*val);
4954        }
4955        if matches!(version, MavlinkVersion::V2) {
4956            let len = __tmp.len();
4957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4958        } else {
4959            __tmp.len()
4960        }
4961    }
4962}
4963#[doc = "The location and information of an ADSB vehicle."]
4964#[doc = ""]
4965#[doc = "ID: 246"]
4966#[derive(Debug, Clone, PartialEq)]
4967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4969#[cfg_attr(feature = "ts", derive(TS))]
4970#[cfg_attr(feature = "ts", ts(export))]
4971pub struct ADSB_VEHICLE_DATA {
4972    #[doc = "ICAO address"]
4973    pub ICAO_address: u32,
4974    #[doc = "Latitude"]
4975    pub lat: i32,
4976    #[doc = "Longitude"]
4977    pub lon: i32,
4978    #[doc = "Altitude(ASL)"]
4979    pub altitude: i32,
4980    #[doc = "Course over ground"]
4981    pub heading: u16,
4982    #[doc = "The horizontal velocity"]
4983    pub hor_velocity: u16,
4984    #[doc = "The vertical velocity. Positive is up"]
4985    pub ver_velocity: i16,
4986    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4987    pub flags: AdsbFlags,
4988    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4989    pub squawk: u16,
4990    #[doc = "ADSB altitude type."]
4991    pub altitude_type: AdsbAltitudeType,
4992    #[doc = "The callsign, 8+null"]
4993    #[cfg_attr(feature = "ts", ts(type = "string"))]
4994    pub callsign: CharArray<9>,
4995    #[doc = "ADSB emitter type."]
4996    pub emitter_type: AdsbEmitterType,
4997    #[doc = "Time since last communication in seconds"]
4998    pub tslc: u8,
4999}
5000impl ADSB_VEHICLE_DATA {
5001    pub const ENCODED_LEN: usize = 38usize;
5002    pub const DEFAULT: Self = Self {
5003        ICAO_address: 0_u32,
5004        lat: 0_i32,
5005        lon: 0_i32,
5006        altitude: 0_i32,
5007        heading: 0_u16,
5008        hor_velocity: 0_u16,
5009        ver_velocity: 0_i16,
5010        flags: AdsbFlags::DEFAULT,
5011        squawk: 0_u16,
5012        altitude_type: AdsbAltitudeType::DEFAULT,
5013        callsign: CharArray::new([0_u8; 9usize]),
5014        emitter_type: AdsbEmitterType::DEFAULT,
5015        tslc: 0_u8,
5016    };
5017    #[cfg(feature = "arbitrary")]
5018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5019        use arbitrary::{Arbitrary, Unstructured};
5020        let mut buf = [0u8; 1024];
5021        rng.fill_bytes(&mut buf);
5022        let mut unstructured = Unstructured::new(&buf);
5023        Self::arbitrary(&mut unstructured).unwrap_or_default()
5024    }
5025}
5026impl Default for ADSB_VEHICLE_DATA {
5027    fn default() -> Self {
5028        Self::DEFAULT.clone()
5029    }
5030}
5031impl MessageData for ADSB_VEHICLE_DATA {
5032    type Message = MavMessage;
5033    const ID: u32 = 246u32;
5034    const NAME: &'static str = "ADSB_VEHICLE";
5035    const EXTRA_CRC: u8 = 184u8;
5036    const ENCODED_LEN: usize = 38usize;
5037    fn deser(
5038        _version: MavlinkVersion,
5039        __input: &[u8],
5040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5041        let avail_len = __input.len();
5042        let mut payload_buf = [0; Self::ENCODED_LEN];
5043        let mut buf = if avail_len < Self::ENCODED_LEN {
5044            payload_buf[0..avail_len].copy_from_slice(__input);
5045            Bytes::new(&payload_buf)
5046        } else {
5047            Bytes::new(__input)
5048        };
5049        let mut __struct = Self::default();
5050        __struct.ICAO_address = buf.get_u32_le()?;
5051        __struct.lat = buf.get_i32_le()?;
5052        __struct.lon = buf.get_i32_le()?;
5053        __struct.altitude = buf.get_i32_le()?;
5054        __struct.heading = buf.get_u16_le()?;
5055        __struct.hor_velocity = buf.get_u16_le()?;
5056        __struct.ver_velocity = buf.get_i16_le()?;
5057        let tmp = buf.get_u16_le()?;
5058        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5059            ::mavlink_core::error::ParserError::InvalidFlag {
5060                flag_type: "AdsbFlags",
5061                value: tmp as u64,
5062            },
5063        )?;
5064        __struct.squawk = buf.get_u16_le()?;
5065        let tmp = buf.get_u8()?;
5066        __struct.altitude_type =
5067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5068                enum_type: "AdsbAltitudeType",
5069                value: tmp as u64,
5070            })?;
5071        let mut tmp = [0_u8; 9usize];
5072        for v in &mut tmp {
5073            *v = buf.get_u8()?;
5074        }
5075        __struct.callsign = CharArray::new(tmp);
5076        let tmp = buf.get_u8()?;
5077        __struct.emitter_type =
5078            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5079                enum_type: "AdsbEmitterType",
5080                value: tmp as u64,
5081            })?;
5082        __struct.tslc = buf.get_u8()?;
5083        Ok(__struct)
5084    }
5085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5086        let mut __tmp = BytesMut::new(bytes);
5087        #[allow(clippy::absurd_extreme_comparisons)]
5088        #[allow(unused_comparisons)]
5089        if __tmp.remaining() < Self::ENCODED_LEN {
5090            panic!(
5091                "buffer is too small (need {} bytes, but got {})",
5092                Self::ENCODED_LEN,
5093                __tmp.remaining(),
5094            )
5095        }
5096        __tmp.put_u32_le(self.ICAO_address);
5097        __tmp.put_i32_le(self.lat);
5098        __tmp.put_i32_le(self.lon);
5099        __tmp.put_i32_le(self.altitude);
5100        __tmp.put_u16_le(self.heading);
5101        __tmp.put_u16_le(self.hor_velocity);
5102        __tmp.put_i16_le(self.ver_velocity);
5103        __tmp.put_u16_le(self.flags.bits() as u16);
5104        __tmp.put_u16_le(self.squawk);
5105        __tmp.put_u8(self.altitude_type as u8);
5106        for val in &self.callsign {
5107            __tmp.put_u8(*val);
5108        }
5109        __tmp.put_u8(self.emitter_type as u8);
5110        __tmp.put_u8(self.tslc);
5111        if matches!(version, MavlinkVersion::V2) {
5112            let len = __tmp.len();
5113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5114        } else {
5115            __tmp.len()
5116        }
5117    }
5118}
5119#[doc = "The location and information of an AIS vessel."]
5120#[doc = ""]
5121#[doc = "ID: 301"]
5122#[derive(Debug, Clone, PartialEq)]
5123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5125#[cfg_attr(feature = "ts", derive(TS))]
5126#[cfg_attr(feature = "ts", ts(export))]
5127pub struct AIS_VESSEL_DATA {
5128    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5129    pub MMSI: u32,
5130    #[doc = "Latitude"]
5131    pub lat: i32,
5132    #[doc = "Longitude"]
5133    pub lon: i32,
5134    #[doc = "Course over ground"]
5135    pub COG: u16,
5136    #[doc = "True heading"]
5137    pub heading: u16,
5138    #[doc = "Speed over ground"]
5139    pub velocity: u16,
5140    #[doc = "Distance from lat/lon location to bow"]
5141    pub dimension_bow: u16,
5142    #[doc = "Distance from lat/lon location to stern"]
5143    pub dimension_stern: u16,
5144    #[doc = "Time since last communication in seconds"]
5145    pub tslc: u16,
5146    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5147    pub flags: AisFlags,
5148    #[doc = "Turn rate"]
5149    pub turn_rate: i8,
5150    #[doc = "Navigational status"]
5151    pub navigational_status: AisNavStatus,
5152    #[doc = "Type of vessels"]
5153    pub mavtype: AisType,
5154    #[doc = "Distance from lat/lon location to port side"]
5155    pub dimension_port: u8,
5156    #[doc = "Distance from lat/lon location to starboard side"]
5157    pub dimension_starboard: u8,
5158    #[doc = "The vessel callsign"]
5159    #[cfg_attr(feature = "ts", ts(type = "string"))]
5160    pub callsign: CharArray<7>,
5161    #[doc = "The vessel name"]
5162    #[cfg_attr(feature = "ts", ts(type = "string"))]
5163    pub name: CharArray<20>,
5164}
5165impl AIS_VESSEL_DATA {
5166    pub const ENCODED_LEN: usize = 58usize;
5167    pub const DEFAULT: Self = Self {
5168        MMSI: 0_u32,
5169        lat: 0_i32,
5170        lon: 0_i32,
5171        COG: 0_u16,
5172        heading: 0_u16,
5173        velocity: 0_u16,
5174        dimension_bow: 0_u16,
5175        dimension_stern: 0_u16,
5176        tslc: 0_u16,
5177        flags: AisFlags::DEFAULT,
5178        turn_rate: 0_i8,
5179        navigational_status: AisNavStatus::DEFAULT,
5180        mavtype: AisType::DEFAULT,
5181        dimension_port: 0_u8,
5182        dimension_starboard: 0_u8,
5183        callsign: CharArray::new([0_u8; 7usize]),
5184        name: CharArray::new([0_u8; 20usize]),
5185    };
5186    #[cfg(feature = "arbitrary")]
5187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5188        use arbitrary::{Arbitrary, Unstructured};
5189        let mut buf = [0u8; 1024];
5190        rng.fill_bytes(&mut buf);
5191        let mut unstructured = Unstructured::new(&buf);
5192        Self::arbitrary(&mut unstructured).unwrap_or_default()
5193    }
5194}
5195impl Default for AIS_VESSEL_DATA {
5196    fn default() -> Self {
5197        Self::DEFAULT.clone()
5198    }
5199}
5200impl MessageData for AIS_VESSEL_DATA {
5201    type Message = MavMessage;
5202    const ID: u32 = 301u32;
5203    const NAME: &'static str = "AIS_VESSEL";
5204    const EXTRA_CRC: u8 = 243u8;
5205    const ENCODED_LEN: usize = 58usize;
5206    fn deser(
5207        _version: MavlinkVersion,
5208        __input: &[u8],
5209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5210        let avail_len = __input.len();
5211        let mut payload_buf = [0; Self::ENCODED_LEN];
5212        let mut buf = if avail_len < Self::ENCODED_LEN {
5213            payload_buf[0..avail_len].copy_from_slice(__input);
5214            Bytes::new(&payload_buf)
5215        } else {
5216            Bytes::new(__input)
5217        };
5218        let mut __struct = Self::default();
5219        __struct.MMSI = buf.get_u32_le()?;
5220        __struct.lat = buf.get_i32_le()?;
5221        __struct.lon = buf.get_i32_le()?;
5222        __struct.COG = buf.get_u16_le()?;
5223        __struct.heading = buf.get_u16_le()?;
5224        __struct.velocity = buf.get_u16_le()?;
5225        __struct.dimension_bow = buf.get_u16_le()?;
5226        __struct.dimension_stern = buf.get_u16_le()?;
5227        __struct.tslc = buf.get_u16_le()?;
5228        let tmp = buf.get_u16_le()?;
5229        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5230            ::mavlink_core::error::ParserError::InvalidFlag {
5231                flag_type: "AisFlags",
5232                value: tmp as u64,
5233            },
5234        )?;
5235        __struct.turn_rate = buf.get_i8()?;
5236        let tmp = buf.get_u8()?;
5237        __struct.navigational_status =
5238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5239                enum_type: "AisNavStatus",
5240                value: tmp as u64,
5241            })?;
5242        let tmp = buf.get_u8()?;
5243        __struct.mavtype =
5244            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5245                enum_type: "AisType",
5246                value: tmp as u64,
5247            })?;
5248        __struct.dimension_port = buf.get_u8()?;
5249        __struct.dimension_starboard = buf.get_u8()?;
5250        let mut tmp = [0_u8; 7usize];
5251        for v in &mut tmp {
5252            *v = buf.get_u8()?;
5253        }
5254        __struct.callsign = CharArray::new(tmp);
5255        let mut tmp = [0_u8; 20usize];
5256        for v in &mut tmp {
5257            *v = buf.get_u8()?;
5258        }
5259        __struct.name = CharArray::new(tmp);
5260        Ok(__struct)
5261    }
5262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5263        let mut __tmp = BytesMut::new(bytes);
5264        #[allow(clippy::absurd_extreme_comparisons)]
5265        #[allow(unused_comparisons)]
5266        if __tmp.remaining() < Self::ENCODED_LEN {
5267            panic!(
5268                "buffer is too small (need {} bytes, but got {})",
5269                Self::ENCODED_LEN,
5270                __tmp.remaining(),
5271            )
5272        }
5273        __tmp.put_u32_le(self.MMSI);
5274        __tmp.put_i32_le(self.lat);
5275        __tmp.put_i32_le(self.lon);
5276        __tmp.put_u16_le(self.COG);
5277        __tmp.put_u16_le(self.heading);
5278        __tmp.put_u16_le(self.velocity);
5279        __tmp.put_u16_le(self.dimension_bow);
5280        __tmp.put_u16_le(self.dimension_stern);
5281        __tmp.put_u16_le(self.tslc);
5282        __tmp.put_u16_le(self.flags.bits() as u16);
5283        __tmp.put_i8(self.turn_rate);
5284        __tmp.put_u8(self.navigational_status as u8);
5285        __tmp.put_u8(self.mavtype as u8);
5286        __tmp.put_u8(self.dimension_port);
5287        __tmp.put_u8(self.dimension_starboard);
5288        for val in &self.callsign {
5289            __tmp.put_u8(*val);
5290        }
5291        for val in &self.name {
5292            __tmp.put_u8(*val);
5293        }
5294        if matches!(version, MavlinkVersion::V2) {
5295            let len = __tmp.len();
5296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5297        } else {
5298            __tmp.len()
5299        }
5300    }
5301}
5302#[doc = "The current system altitude."]
5303#[doc = ""]
5304#[doc = "ID: 141"]
5305#[derive(Debug, Clone, PartialEq)]
5306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5308#[cfg_attr(feature = "ts", derive(TS))]
5309#[cfg_attr(feature = "ts", ts(export))]
5310pub struct ALTITUDE_DATA {
5311    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5312    pub time_usec: u64,
5313    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5314    pub altitude_monotonic: f32,
5315    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5316    pub altitude_amsl: f32,
5317    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5318    pub altitude_local: f32,
5319    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5320    pub altitude_relative: f32,
5321    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5322    pub altitude_terrain: f32,
5323    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5324    pub bottom_clearance: f32,
5325}
5326impl ALTITUDE_DATA {
5327    pub const ENCODED_LEN: usize = 32usize;
5328    pub const DEFAULT: Self = Self {
5329        time_usec: 0_u64,
5330        altitude_monotonic: 0.0_f32,
5331        altitude_amsl: 0.0_f32,
5332        altitude_local: 0.0_f32,
5333        altitude_relative: 0.0_f32,
5334        altitude_terrain: 0.0_f32,
5335        bottom_clearance: 0.0_f32,
5336    };
5337    #[cfg(feature = "arbitrary")]
5338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5339        use arbitrary::{Arbitrary, Unstructured};
5340        let mut buf = [0u8; 1024];
5341        rng.fill_bytes(&mut buf);
5342        let mut unstructured = Unstructured::new(&buf);
5343        Self::arbitrary(&mut unstructured).unwrap_or_default()
5344    }
5345}
5346impl Default for ALTITUDE_DATA {
5347    fn default() -> Self {
5348        Self::DEFAULT.clone()
5349    }
5350}
5351impl MessageData for ALTITUDE_DATA {
5352    type Message = MavMessage;
5353    const ID: u32 = 141u32;
5354    const NAME: &'static str = "ALTITUDE";
5355    const EXTRA_CRC: u8 = 47u8;
5356    const ENCODED_LEN: usize = 32usize;
5357    fn deser(
5358        _version: MavlinkVersion,
5359        __input: &[u8],
5360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5361        let avail_len = __input.len();
5362        let mut payload_buf = [0; Self::ENCODED_LEN];
5363        let mut buf = if avail_len < Self::ENCODED_LEN {
5364            payload_buf[0..avail_len].copy_from_slice(__input);
5365            Bytes::new(&payload_buf)
5366        } else {
5367            Bytes::new(__input)
5368        };
5369        let mut __struct = Self::default();
5370        __struct.time_usec = buf.get_u64_le()?;
5371        __struct.altitude_monotonic = buf.get_f32_le()?;
5372        __struct.altitude_amsl = buf.get_f32_le()?;
5373        __struct.altitude_local = buf.get_f32_le()?;
5374        __struct.altitude_relative = buf.get_f32_le()?;
5375        __struct.altitude_terrain = buf.get_f32_le()?;
5376        __struct.bottom_clearance = buf.get_f32_le()?;
5377        Ok(__struct)
5378    }
5379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5380        let mut __tmp = BytesMut::new(bytes);
5381        #[allow(clippy::absurd_extreme_comparisons)]
5382        #[allow(unused_comparisons)]
5383        if __tmp.remaining() < Self::ENCODED_LEN {
5384            panic!(
5385                "buffer is too small (need {} bytes, but got {})",
5386                Self::ENCODED_LEN,
5387                __tmp.remaining(),
5388            )
5389        }
5390        __tmp.put_u64_le(self.time_usec);
5391        __tmp.put_f32_le(self.altitude_monotonic);
5392        __tmp.put_f32_le(self.altitude_amsl);
5393        __tmp.put_f32_le(self.altitude_local);
5394        __tmp.put_f32_le(self.altitude_relative);
5395        __tmp.put_f32_le(self.altitude_terrain);
5396        __tmp.put_f32_le(self.bottom_clearance);
5397        if matches!(version, MavlinkVersion::V2) {
5398            let len = __tmp.len();
5399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5400        } else {
5401            __tmp.len()
5402        }
5403    }
5404}
5405#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5406#[doc = ""]
5407#[doc = "ID: 30"]
5408#[derive(Debug, Clone, PartialEq)]
5409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5411#[cfg_attr(feature = "ts", derive(TS))]
5412#[cfg_attr(feature = "ts", ts(export))]
5413pub struct ATTITUDE_DATA {
5414    #[doc = "Timestamp (time since system boot)."]
5415    pub time_boot_ms: u32,
5416    #[doc = "Roll angle (-pi..+pi)"]
5417    pub roll: f32,
5418    #[doc = "Pitch angle (-pi..+pi)"]
5419    pub pitch: f32,
5420    #[doc = "Yaw angle (-pi..+pi)"]
5421    pub yaw: f32,
5422    #[doc = "Roll angular speed"]
5423    pub rollspeed: f32,
5424    #[doc = "Pitch angular speed"]
5425    pub pitchspeed: f32,
5426    #[doc = "Yaw angular speed"]
5427    pub yawspeed: f32,
5428}
5429impl ATTITUDE_DATA {
5430    pub const ENCODED_LEN: usize = 28usize;
5431    pub const DEFAULT: Self = Self {
5432        time_boot_ms: 0_u32,
5433        roll: 0.0_f32,
5434        pitch: 0.0_f32,
5435        yaw: 0.0_f32,
5436        rollspeed: 0.0_f32,
5437        pitchspeed: 0.0_f32,
5438        yawspeed: 0.0_f32,
5439    };
5440    #[cfg(feature = "arbitrary")]
5441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5442        use arbitrary::{Arbitrary, Unstructured};
5443        let mut buf = [0u8; 1024];
5444        rng.fill_bytes(&mut buf);
5445        let mut unstructured = Unstructured::new(&buf);
5446        Self::arbitrary(&mut unstructured).unwrap_or_default()
5447    }
5448}
5449impl Default for ATTITUDE_DATA {
5450    fn default() -> Self {
5451        Self::DEFAULT.clone()
5452    }
5453}
5454impl MessageData for ATTITUDE_DATA {
5455    type Message = MavMessage;
5456    const ID: u32 = 30u32;
5457    const NAME: &'static str = "ATTITUDE";
5458    const EXTRA_CRC: u8 = 39u8;
5459    const ENCODED_LEN: usize = 28usize;
5460    fn deser(
5461        _version: MavlinkVersion,
5462        __input: &[u8],
5463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5464        let avail_len = __input.len();
5465        let mut payload_buf = [0; Self::ENCODED_LEN];
5466        let mut buf = if avail_len < Self::ENCODED_LEN {
5467            payload_buf[0..avail_len].copy_from_slice(__input);
5468            Bytes::new(&payload_buf)
5469        } else {
5470            Bytes::new(__input)
5471        };
5472        let mut __struct = Self::default();
5473        __struct.time_boot_ms = buf.get_u32_le()?;
5474        __struct.roll = buf.get_f32_le()?;
5475        __struct.pitch = buf.get_f32_le()?;
5476        __struct.yaw = buf.get_f32_le()?;
5477        __struct.rollspeed = buf.get_f32_le()?;
5478        __struct.pitchspeed = buf.get_f32_le()?;
5479        __struct.yawspeed = buf.get_f32_le()?;
5480        Ok(__struct)
5481    }
5482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5483        let mut __tmp = BytesMut::new(bytes);
5484        #[allow(clippy::absurd_extreme_comparisons)]
5485        #[allow(unused_comparisons)]
5486        if __tmp.remaining() < Self::ENCODED_LEN {
5487            panic!(
5488                "buffer is too small (need {} bytes, but got {})",
5489                Self::ENCODED_LEN,
5490                __tmp.remaining(),
5491            )
5492        }
5493        __tmp.put_u32_le(self.time_boot_ms);
5494        __tmp.put_f32_le(self.roll);
5495        __tmp.put_f32_le(self.pitch);
5496        __tmp.put_f32_le(self.yaw);
5497        __tmp.put_f32_le(self.rollspeed);
5498        __tmp.put_f32_le(self.pitchspeed);
5499        __tmp.put_f32_le(self.yawspeed);
5500        if matches!(version, MavlinkVersion::V2) {
5501            let len = __tmp.len();
5502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5503        } else {
5504            __tmp.len()
5505        }
5506    }
5507}
5508#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5509#[doc = ""]
5510#[doc = "ID: 31"]
5511#[derive(Debug, Clone, PartialEq)]
5512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5514#[cfg_attr(feature = "ts", derive(TS))]
5515#[cfg_attr(feature = "ts", ts(export))]
5516pub struct ATTITUDE_QUATERNION_DATA {
5517    #[doc = "Timestamp (time since system boot)."]
5518    pub time_boot_ms: u32,
5519    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5520    pub q1: f32,
5521    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5522    pub q2: f32,
5523    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5524    pub q3: f32,
5525    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5526    pub q4: f32,
5527    #[doc = "Roll angular speed"]
5528    pub rollspeed: f32,
5529    #[doc = "Pitch angular speed"]
5530    pub pitchspeed: f32,
5531    #[doc = "Yaw angular speed"]
5532    pub yawspeed: f32,
5533    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5534    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5535    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5536    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5537    pub repr_offset_q: [f32; 4],
5538}
5539impl ATTITUDE_QUATERNION_DATA {
5540    pub const ENCODED_LEN: usize = 48usize;
5541    pub const DEFAULT: Self = Self {
5542        time_boot_ms: 0_u32,
5543        q1: 0.0_f32,
5544        q2: 0.0_f32,
5545        q3: 0.0_f32,
5546        q4: 0.0_f32,
5547        rollspeed: 0.0_f32,
5548        pitchspeed: 0.0_f32,
5549        yawspeed: 0.0_f32,
5550        repr_offset_q: [0.0_f32; 4usize],
5551    };
5552    #[cfg(feature = "arbitrary")]
5553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5554        use arbitrary::{Arbitrary, Unstructured};
5555        let mut buf = [0u8; 1024];
5556        rng.fill_bytes(&mut buf);
5557        let mut unstructured = Unstructured::new(&buf);
5558        Self::arbitrary(&mut unstructured).unwrap_or_default()
5559    }
5560}
5561impl Default for ATTITUDE_QUATERNION_DATA {
5562    fn default() -> Self {
5563        Self::DEFAULT.clone()
5564    }
5565}
5566impl MessageData for ATTITUDE_QUATERNION_DATA {
5567    type Message = MavMessage;
5568    const ID: u32 = 31u32;
5569    const NAME: &'static str = "ATTITUDE_QUATERNION";
5570    const EXTRA_CRC: u8 = 246u8;
5571    const ENCODED_LEN: usize = 48usize;
5572    fn deser(
5573        _version: MavlinkVersion,
5574        __input: &[u8],
5575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5576        let avail_len = __input.len();
5577        let mut payload_buf = [0; Self::ENCODED_LEN];
5578        let mut buf = if avail_len < Self::ENCODED_LEN {
5579            payload_buf[0..avail_len].copy_from_slice(__input);
5580            Bytes::new(&payload_buf)
5581        } else {
5582            Bytes::new(__input)
5583        };
5584        let mut __struct = Self::default();
5585        __struct.time_boot_ms = buf.get_u32_le()?;
5586        __struct.q1 = buf.get_f32_le()?;
5587        __struct.q2 = buf.get_f32_le()?;
5588        __struct.q3 = buf.get_f32_le()?;
5589        __struct.q4 = buf.get_f32_le()?;
5590        __struct.rollspeed = buf.get_f32_le()?;
5591        __struct.pitchspeed = buf.get_f32_le()?;
5592        __struct.yawspeed = buf.get_f32_le()?;
5593        for v in &mut __struct.repr_offset_q {
5594            let val = buf.get_f32_le()?;
5595            *v = val;
5596        }
5597        Ok(__struct)
5598    }
5599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5600        let mut __tmp = BytesMut::new(bytes);
5601        #[allow(clippy::absurd_extreme_comparisons)]
5602        #[allow(unused_comparisons)]
5603        if __tmp.remaining() < Self::ENCODED_LEN {
5604            panic!(
5605                "buffer is too small (need {} bytes, but got {})",
5606                Self::ENCODED_LEN,
5607                __tmp.remaining(),
5608            )
5609        }
5610        __tmp.put_u32_le(self.time_boot_ms);
5611        __tmp.put_f32_le(self.q1);
5612        __tmp.put_f32_le(self.q2);
5613        __tmp.put_f32_le(self.q3);
5614        __tmp.put_f32_le(self.q4);
5615        __tmp.put_f32_le(self.rollspeed);
5616        __tmp.put_f32_le(self.pitchspeed);
5617        __tmp.put_f32_le(self.yawspeed);
5618        if matches!(version, MavlinkVersion::V2) {
5619            for val in &self.repr_offset_q {
5620                __tmp.put_f32_le(*val);
5621            }
5622            let len = __tmp.len();
5623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5624        } else {
5625            __tmp.len()
5626        }
5627    }
5628}
5629#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5630#[doc = ""]
5631#[doc = "ID: 61"]
5632#[derive(Debug, Clone, PartialEq)]
5633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5635#[cfg_attr(feature = "ts", derive(TS))]
5636#[cfg_attr(feature = "ts", ts(export))]
5637pub struct ATTITUDE_QUATERNION_COV_DATA {
5638    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5639    pub time_usec: u64,
5640    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5641    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5642    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5643    pub q: [f32; 4],
5644    #[doc = "Roll angular speed"]
5645    pub rollspeed: f32,
5646    #[doc = "Pitch angular speed"]
5647    pub pitchspeed: f32,
5648    #[doc = "Yaw angular speed"]
5649    pub yawspeed: f32,
5650    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5651    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5652    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5653    pub covariance: [f32; 9],
5654}
5655impl ATTITUDE_QUATERNION_COV_DATA {
5656    pub const ENCODED_LEN: usize = 72usize;
5657    pub const DEFAULT: Self = Self {
5658        time_usec: 0_u64,
5659        q: [0.0_f32; 4usize],
5660        rollspeed: 0.0_f32,
5661        pitchspeed: 0.0_f32,
5662        yawspeed: 0.0_f32,
5663        covariance: [0.0_f32; 9usize],
5664    };
5665    #[cfg(feature = "arbitrary")]
5666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5667        use arbitrary::{Arbitrary, Unstructured};
5668        let mut buf = [0u8; 1024];
5669        rng.fill_bytes(&mut buf);
5670        let mut unstructured = Unstructured::new(&buf);
5671        Self::arbitrary(&mut unstructured).unwrap_or_default()
5672    }
5673}
5674impl Default for ATTITUDE_QUATERNION_COV_DATA {
5675    fn default() -> Self {
5676        Self::DEFAULT.clone()
5677    }
5678}
5679impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5680    type Message = MavMessage;
5681    const ID: u32 = 61u32;
5682    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5683    const EXTRA_CRC: u8 = 167u8;
5684    const ENCODED_LEN: usize = 72usize;
5685    fn deser(
5686        _version: MavlinkVersion,
5687        __input: &[u8],
5688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5689        let avail_len = __input.len();
5690        let mut payload_buf = [0; Self::ENCODED_LEN];
5691        let mut buf = if avail_len < Self::ENCODED_LEN {
5692            payload_buf[0..avail_len].copy_from_slice(__input);
5693            Bytes::new(&payload_buf)
5694        } else {
5695            Bytes::new(__input)
5696        };
5697        let mut __struct = Self::default();
5698        __struct.time_usec = buf.get_u64_le()?;
5699        for v in &mut __struct.q {
5700            let val = buf.get_f32_le()?;
5701            *v = val;
5702        }
5703        __struct.rollspeed = buf.get_f32_le()?;
5704        __struct.pitchspeed = buf.get_f32_le()?;
5705        __struct.yawspeed = buf.get_f32_le()?;
5706        for v in &mut __struct.covariance {
5707            let val = buf.get_f32_le()?;
5708            *v = val;
5709        }
5710        Ok(__struct)
5711    }
5712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5713        let mut __tmp = BytesMut::new(bytes);
5714        #[allow(clippy::absurd_extreme_comparisons)]
5715        #[allow(unused_comparisons)]
5716        if __tmp.remaining() < Self::ENCODED_LEN {
5717            panic!(
5718                "buffer is too small (need {} bytes, but got {})",
5719                Self::ENCODED_LEN,
5720                __tmp.remaining(),
5721            )
5722        }
5723        __tmp.put_u64_le(self.time_usec);
5724        for val in &self.q {
5725            __tmp.put_f32_le(*val);
5726        }
5727        __tmp.put_f32_le(self.rollspeed);
5728        __tmp.put_f32_le(self.pitchspeed);
5729        __tmp.put_f32_le(self.yawspeed);
5730        for val in &self.covariance {
5731            __tmp.put_f32_le(*val);
5732        }
5733        if matches!(version, MavlinkVersion::V2) {
5734            let len = __tmp.len();
5735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5736        } else {
5737            __tmp.len()
5738        }
5739    }
5740}
5741#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5742#[doc = ""]
5743#[doc = "ID: 83"]
5744#[derive(Debug, Clone, PartialEq)]
5745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5747#[cfg_attr(feature = "ts", derive(TS))]
5748#[cfg_attr(feature = "ts", ts(export))]
5749pub struct ATTITUDE_TARGET_DATA {
5750    #[doc = "Timestamp (time since system boot)."]
5751    pub time_boot_ms: u32,
5752    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5753    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5754    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5755    pub q: [f32; 4],
5756    #[doc = "Body roll rate"]
5757    pub body_roll_rate: f32,
5758    #[doc = "Body pitch rate"]
5759    pub body_pitch_rate: f32,
5760    #[doc = "Body yaw rate"]
5761    pub body_yaw_rate: f32,
5762    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5763    pub thrust: f32,
5764    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5765    pub type_mask: AttitudeTargetTypemask,
5766}
5767impl ATTITUDE_TARGET_DATA {
5768    pub const ENCODED_LEN: usize = 37usize;
5769    pub const DEFAULT: Self = Self {
5770        time_boot_ms: 0_u32,
5771        q: [0.0_f32; 4usize],
5772        body_roll_rate: 0.0_f32,
5773        body_pitch_rate: 0.0_f32,
5774        body_yaw_rate: 0.0_f32,
5775        thrust: 0.0_f32,
5776        type_mask: AttitudeTargetTypemask::DEFAULT,
5777    };
5778    #[cfg(feature = "arbitrary")]
5779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5780        use arbitrary::{Arbitrary, Unstructured};
5781        let mut buf = [0u8; 1024];
5782        rng.fill_bytes(&mut buf);
5783        let mut unstructured = Unstructured::new(&buf);
5784        Self::arbitrary(&mut unstructured).unwrap_or_default()
5785    }
5786}
5787impl Default for ATTITUDE_TARGET_DATA {
5788    fn default() -> Self {
5789        Self::DEFAULT.clone()
5790    }
5791}
5792impl MessageData for ATTITUDE_TARGET_DATA {
5793    type Message = MavMessage;
5794    const ID: u32 = 83u32;
5795    const NAME: &'static str = "ATTITUDE_TARGET";
5796    const EXTRA_CRC: u8 = 22u8;
5797    const ENCODED_LEN: usize = 37usize;
5798    fn deser(
5799        _version: MavlinkVersion,
5800        __input: &[u8],
5801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5802        let avail_len = __input.len();
5803        let mut payload_buf = [0; Self::ENCODED_LEN];
5804        let mut buf = if avail_len < Self::ENCODED_LEN {
5805            payload_buf[0..avail_len].copy_from_slice(__input);
5806            Bytes::new(&payload_buf)
5807        } else {
5808            Bytes::new(__input)
5809        };
5810        let mut __struct = Self::default();
5811        __struct.time_boot_ms = buf.get_u32_le()?;
5812        for v in &mut __struct.q {
5813            let val = buf.get_f32_le()?;
5814            *v = val;
5815        }
5816        __struct.body_roll_rate = buf.get_f32_le()?;
5817        __struct.body_pitch_rate = buf.get_f32_le()?;
5818        __struct.body_yaw_rate = buf.get_f32_le()?;
5819        __struct.thrust = buf.get_f32_le()?;
5820        let tmp = buf.get_u8()?;
5821        __struct.type_mask =
5822            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5823                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5824                    flag_type: "AttitudeTargetTypemask",
5825                    value: tmp as u64,
5826                })?;
5827        Ok(__struct)
5828    }
5829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5830        let mut __tmp = BytesMut::new(bytes);
5831        #[allow(clippy::absurd_extreme_comparisons)]
5832        #[allow(unused_comparisons)]
5833        if __tmp.remaining() < Self::ENCODED_LEN {
5834            panic!(
5835                "buffer is too small (need {} bytes, but got {})",
5836                Self::ENCODED_LEN,
5837                __tmp.remaining(),
5838            )
5839        }
5840        __tmp.put_u32_le(self.time_boot_ms);
5841        for val in &self.q {
5842            __tmp.put_f32_le(*val);
5843        }
5844        __tmp.put_f32_le(self.body_roll_rate);
5845        __tmp.put_f32_le(self.body_pitch_rate);
5846        __tmp.put_f32_le(self.body_yaw_rate);
5847        __tmp.put_f32_le(self.thrust);
5848        __tmp.put_u8(self.type_mask.bits() as u8);
5849        if matches!(version, MavlinkVersion::V2) {
5850            let len = __tmp.len();
5851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5852        } else {
5853            __tmp.len()
5854        }
5855    }
5856}
5857#[doc = "Motion capture attitude and position."]
5858#[doc = ""]
5859#[doc = "ID: 138"]
5860#[derive(Debug, Clone, PartialEq)]
5861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5863#[cfg_attr(feature = "ts", derive(TS))]
5864#[cfg_attr(feature = "ts", ts(export))]
5865pub struct ATT_POS_MOCAP_DATA {
5866    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5867    pub time_usec: u64,
5868    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5871    pub q: [f32; 4],
5872    #[doc = "X position (NED)"]
5873    pub x: f32,
5874    #[doc = "Y position (NED)"]
5875    pub y: f32,
5876    #[doc = "Z position (NED)"]
5877    pub z: f32,
5878    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5880    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5881    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5882    pub covariance: [f32; 21],
5883}
5884impl ATT_POS_MOCAP_DATA {
5885    pub const ENCODED_LEN: usize = 120usize;
5886    pub const DEFAULT: Self = Self {
5887        time_usec: 0_u64,
5888        q: [0.0_f32; 4usize],
5889        x: 0.0_f32,
5890        y: 0.0_f32,
5891        z: 0.0_f32,
5892        covariance: [0.0_f32; 21usize],
5893    };
5894    #[cfg(feature = "arbitrary")]
5895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5896        use arbitrary::{Arbitrary, Unstructured};
5897        let mut buf = [0u8; 1024];
5898        rng.fill_bytes(&mut buf);
5899        let mut unstructured = Unstructured::new(&buf);
5900        Self::arbitrary(&mut unstructured).unwrap_or_default()
5901    }
5902}
5903impl Default for ATT_POS_MOCAP_DATA {
5904    fn default() -> Self {
5905        Self::DEFAULT.clone()
5906    }
5907}
5908impl MessageData for ATT_POS_MOCAP_DATA {
5909    type Message = MavMessage;
5910    const ID: u32 = 138u32;
5911    const NAME: &'static str = "ATT_POS_MOCAP";
5912    const EXTRA_CRC: u8 = 109u8;
5913    const ENCODED_LEN: usize = 120usize;
5914    fn deser(
5915        _version: MavlinkVersion,
5916        __input: &[u8],
5917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5918        let avail_len = __input.len();
5919        let mut payload_buf = [0; Self::ENCODED_LEN];
5920        let mut buf = if avail_len < Self::ENCODED_LEN {
5921            payload_buf[0..avail_len].copy_from_slice(__input);
5922            Bytes::new(&payload_buf)
5923        } else {
5924            Bytes::new(__input)
5925        };
5926        let mut __struct = Self::default();
5927        __struct.time_usec = buf.get_u64_le()?;
5928        for v in &mut __struct.q {
5929            let val = buf.get_f32_le()?;
5930            *v = val;
5931        }
5932        __struct.x = buf.get_f32_le()?;
5933        __struct.y = buf.get_f32_le()?;
5934        __struct.z = buf.get_f32_le()?;
5935        for v in &mut __struct.covariance {
5936            let val = buf.get_f32_le()?;
5937            *v = val;
5938        }
5939        Ok(__struct)
5940    }
5941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5942        let mut __tmp = BytesMut::new(bytes);
5943        #[allow(clippy::absurd_extreme_comparisons)]
5944        #[allow(unused_comparisons)]
5945        if __tmp.remaining() < Self::ENCODED_LEN {
5946            panic!(
5947                "buffer is too small (need {} bytes, but got {})",
5948                Self::ENCODED_LEN,
5949                __tmp.remaining(),
5950            )
5951        }
5952        __tmp.put_u64_le(self.time_usec);
5953        for val in &self.q {
5954            __tmp.put_f32_le(*val);
5955        }
5956        __tmp.put_f32_le(self.x);
5957        __tmp.put_f32_le(self.y);
5958        __tmp.put_f32_le(self.z);
5959        if matches!(version, MavlinkVersion::V2) {
5960            for val in &self.covariance {
5961                __tmp.put_f32_le(*val);
5962            }
5963            let len = __tmp.len();
5964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5965        } else {
5966            __tmp.len()
5967        }
5968    }
5969}
5970#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5971#[doc = ""]
5972#[doc = "ID: 7"]
5973#[derive(Debug, Clone, PartialEq)]
5974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5976#[cfg_attr(feature = "ts", derive(TS))]
5977#[cfg_attr(feature = "ts", ts(export))]
5978pub struct AUTH_KEY_DATA {
5979    #[doc = "key"]
5980    #[cfg_attr(feature = "ts", ts(type = "string"))]
5981    pub key: CharArray<32>,
5982}
5983impl AUTH_KEY_DATA {
5984    pub const ENCODED_LEN: usize = 32usize;
5985    pub const DEFAULT: Self = Self {
5986        key: CharArray::new([0_u8; 32usize]),
5987    };
5988    #[cfg(feature = "arbitrary")]
5989    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5990        use arbitrary::{Arbitrary, Unstructured};
5991        let mut buf = [0u8; 1024];
5992        rng.fill_bytes(&mut buf);
5993        let mut unstructured = Unstructured::new(&buf);
5994        Self::arbitrary(&mut unstructured).unwrap_or_default()
5995    }
5996}
5997impl Default for AUTH_KEY_DATA {
5998    fn default() -> Self {
5999        Self::DEFAULT.clone()
6000    }
6001}
6002impl MessageData for AUTH_KEY_DATA {
6003    type Message = MavMessage;
6004    const ID: u32 = 7u32;
6005    const NAME: &'static str = "AUTH_KEY";
6006    const EXTRA_CRC: u8 = 119u8;
6007    const ENCODED_LEN: usize = 32usize;
6008    fn deser(
6009        _version: MavlinkVersion,
6010        __input: &[u8],
6011    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6012        let avail_len = __input.len();
6013        let mut payload_buf = [0; Self::ENCODED_LEN];
6014        let mut buf = if avail_len < Self::ENCODED_LEN {
6015            payload_buf[0..avail_len].copy_from_slice(__input);
6016            Bytes::new(&payload_buf)
6017        } else {
6018            Bytes::new(__input)
6019        };
6020        let mut __struct = Self::default();
6021        let mut tmp = [0_u8; 32usize];
6022        for v in &mut tmp {
6023            *v = buf.get_u8()?;
6024        }
6025        __struct.key = CharArray::new(tmp);
6026        Ok(__struct)
6027    }
6028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6029        let mut __tmp = BytesMut::new(bytes);
6030        #[allow(clippy::absurd_extreme_comparisons)]
6031        #[allow(unused_comparisons)]
6032        if __tmp.remaining() < Self::ENCODED_LEN {
6033            panic!(
6034                "buffer is too small (need {} bytes, but got {})",
6035                Self::ENCODED_LEN,
6036                __tmp.remaining(),
6037            )
6038        }
6039        for val in &self.key {
6040            __tmp.put_u8(*val);
6041        }
6042        if matches!(version, MavlinkVersion::V2) {
6043            let len = __tmp.len();
6044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6045        } else {
6046            __tmp.len()
6047        }
6048    }
6049}
6050#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6051#[doc = ""]
6052#[doc = "ID: 286"]
6053#[derive(Debug, Clone, PartialEq)]
6054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6056#[cfg_attr(feature = "ts", derive(TS))]
6057#[cfg_attr(feature = "ts", ts(export))]
6058pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6059    #[doc = "Timestamp (time since system boot)."]
6060    pub time_boot_us: u64,
6061    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6063    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6064    pub q: [f32; 4],
6065    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6066    pub q_estimated_delay_us: u32,
6067    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6068    pub vx: f32,
6069    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6070    pub vy: f32,
6071    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6072    pub vz: f32,
6073    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6074    pub v_estimated_delay_us: u32,
6075    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6076    pub feed_forward_angular_velocity_z: f32,
6077    #[doc = "Bitmap indicating which estimator outputs are valid."]
6078    pub estimator_status: EstimatorStatusFlags,
6079    #[doc = "System ID"]
6080    pub target_system: u8,
6081    #[doc = "Component ID"]
6082    pub target_component: u8,
6083    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6084    pub landed_state: MavLandedState,
6085    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6086    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6087    pub angular_velocity_z: f32,
6088}
6089impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6090    pub const ENCODED_LEN: usize = 57usize;
6091    pub const DEFAULT: Self = Self {
6092        time_boot_us: 0_u64,
6093        q: [0.0_f32; 4usize],
6094        q_estimated_delay_us: 0_u32,
6095        vx: 0.0_f32,
6096        vy: 0.0_f32,
6097        vz: 0.0_f32,
6098        v_estimated_delay_us: 0_u32,
6099        feed_forward_angular_velocity_z: 0.0_f32,
6100        estimator_status: EstimatorStatusFlags::DEFAULT,
6101        target_system: 0_u8,
6102        target_component: 0_u8,
6103        landed_state: MavLandedState::DEFAULT,
6104        angular_velocity_z: 0.0_f32,
6105    };
6106    #[cfg(feature = "arbitrary")]
6107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6108        use arbitrary::{Arbitrary, Unstructured};
6109        let mut buf = [0u8; 1024];
6110        rng.fill_bytes(&mut buf);
6111        let mut unstructured = Unstructured::new(&buf);
6112        Self::arbitrary(&mut unstructured).unwrap_or_default()
6113    }
6114}
6115impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6116    fn default() -> Self {
6117        Self::DEFAULT.clone()
6118    }
6119}
6120impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6121    type Message = MavMessage;
6122    const ID: u32 = 286u32;
6123    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6124    const EXTRA_CRC: u8 = 210u8;
6125    const ENCODED_LEN: usize = 57usize;
6126    fn deser(
6127        _version: MavlinkVersion,
6128        __input: &[u8],
6129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6130        let avail_len = __input.len();
6131        let mut payload_buf = [0; Self::ENCODED_LEN];
6132        let mut buf = if avail_len < Self::ENCODED_LEN {
6133            payload_buf[0..avail_len].copy_from_slice(__input);
6134            Bytes::new(&payload_buf)
6135        } else {
6136            Bytes::new(__input)
6137        };
6138        let mut __struct = Self::default();
6139        __struct.time_boot_us = buf.get_u64_le()?;
6140        for v in &mut __struct.q {
6141            let val = buf.get_f32_le()?;
6142            *v = val;
6143        }
6144        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6145        __struct.vx = buf.get_f32_le()?;
6146        __struct.vy = buf.get_f32_le()?;
6147        __struct.vz = buf.get_f32_le()?;
6148        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6149        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6150        let tmp = buf.get_u16_le()?;
6151        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6152            tmp as <EstimatorStatusFlags as Flags>::Bits,
6153        )
6154        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6155            flag_type: "EstimatorStatusFlags",
6156            value: tmp as u64,
6157        })?;
6158        __struct.target_system = buf.get_u8()?;
6159        __struct.target_component = buf.get_u8()?;
6160        let tmp = buf.get_u8()?;
6161        __struct.landed_state =
6162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6163                enum_type: "MavLandedState",
6164                value: tmp as u64,
6165            })?;
6166        __struct.angular_velocity_z = buf.get_f32_le()?;
6167        Ok(__struct)
6168    }
6169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6170        let mut __tmp = BytesMut::new(bytes);
6171        #[allow(clippy::absurd_extreme_comparisons)]
6172        #[allow(unused_comparisons)]
6173        if __tmp.remaining() < Self::ENCODED_LEN {
6174            panic!(
6175                "buffer is too small (need {} bytes, but got {})",
6176                Self::ENCODED_LEN,
6177                __tmp.remaining(),
6178            )
6179        }
6180        __tmp.put_u64_le(self.time_boot_us);
6181        for val in &self.q {
6182            __tmp.put_f32_le(*val);
6183        }
6184        __tmp.put_u32_le(self.q_estimated_delay_us);
6185        __tmp.put_f32_le(self.vx);
6186        __tmp.put_f32_le(self.vy);
6187        __tmp.put_f32_le(self.vz);
6188        __tmp.put_u32_le(self.v_estimated_delay_us);
6189        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6190        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6191        __tmp.put_u8(self.target_system);
6192        __tmp.put_u8(self.target_component);
6193        __tmp.put_u8(self.landed_state as u8);
6194        if matches!(version, MavlinkVersion::V2) {
6195            __tmp.put_f32_le(self.angular_velocity_z);
6196            let len = __tmp.len();
6197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6198        } else {
6199            __tmp.len()
6200        }
6201    }
6202}
6203#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6204#[doc = ""]
6205#[doc = "ID: 148"]
6206#[derive(Debug, Clone, PartialEq)]
6207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6209#[cfg_attr(feature = "ts", derive(TS))]
6210#[cfg_attr(feature = "ts", ts(export))]
6211pub struct AUTOPILOT_VERSION_DATA {
6212    #[doc = "Bitmap of capabilities"]
6213    pub capabilities: MavProtocolCapability,
6214    #[doc = "UID if provided by hardware (see uid2)"]
6215    pub uid: u64,
6216    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6217    pub flight_sw_version: u32,
6218    #[doc = "Middleware version number"]
6219    pub middleware_sw_version: u32,
6220    #[doc = "Operating system version number"]
6221    pub os_sw_version: u32,
6222    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6223    pub board_version: u32,
6224    #[doc = "ID of the board vendor"]
6225    pub vendor_id: u16,
6226    #[doc = "ID of the product"]
6227    pub product_id: u16,
6228    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6229    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6230    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6231    pub flight_custom_version: [u8; 8],
6232    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6234    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6235    pub middleware_custom_version: [u8; 8],
6236    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6239    pub os_custom_version: [u8; 8],
6240    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6241    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6242    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6243    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6244    pub uid2: [u8; 18],
6245}
6246impl AUTOPILOT_VERSION_DATA {
6247    pub const ENCODED_LEN: usize = 78usize;
6248    pub const DEFAULT: Self = Self {
6249        capabilities: MavProtocolCapability::DEFAULT,
6250        uid: 0_u64,
6251        flight_sw_version: 0_u32,
6252        middleware_sw_version: 0_u32,
6253        os_sw_version: 0_u32,
6254        board_version: 0_u32,
6255        vendor_id: 0_u16,
6256        product_id: 0_u16,
6257        flight_custom_version: [0_u8; 8usize],
6258        middleware_custom_version: [0_u8; 8usize],
6259        os_custom_version: [0_u8; 8usize],
6260        uid2: [0_u8; 18usize],
6261    };
6262    #[cfg(feature = "arbitrary")]
6263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6264        use arbitrary::{Arbitrary, Unstructured};
6265        let mut buf = [0u8; 1024];
6266        rng.fill_bytes(&mut buf);
6267        let mut unstructured = Unstructured::new(&buf);
6268        Self::arbitrary(&mut unstructured).unwrap_or_default()
6269    }
6270}
6271impl Default for AUTOPILOT_VERSION_DATA {
6272    fn default() -> Self {
6273        Self::DEFAULT.clone()
6274    }
6275}
6276impl MessageData for AUTOPILOT_VERSION_DATA {
6277    type Message = MavMessage;
6278    const ID: u32 = 148u32;
6279    const NAME: &'static str = "AUTOPILOT_VERSION";
6280    const EXTRA_CRC: u8 = 178u8;
6281    const ENCODED_LEN: usize = 78usize;
6282    fn deser(
6283        _version: MavlinkVersion,
6284        __input: &[u8],
6285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6286        let avail_len = __input.len();
6287        let mut payload_buf = [0; Self::ENCODED_LEN];
6288        let mut buf = if avail_len < Self::ENCODED_LEN {
6289            payload_buf[0..avail_len].copy_from_slice(__input);
6290            Bytes::new(&payload_buf)
6291        } else {
6292            Bytes::new(__input)
6293        };
6294        let mut __struct = Self::default();
6295        let tmp = buf.get_u64_le()?;
6296        __struct.capabilities = MavProtocolCapability::from_bits(
6297            tmp as <MavProtocolCapability as Flags>::Bits,
6298        )
6299        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6300            flag_type: "MavProtocolCapability",
6301            value: tmp as u64,
6302        })?;
6303        __struct.uid = buf.get_u64_le()?;
6304        __struct.flight_sw_version = buf.get_u32_le()?;
6305        __struct.middleware_sw_version = buf.get_u32_le()?;
6306        __struct.os_sw_version = buf.get_u32_le()?;
6307        __struct.board_version = buf.get_u32_le()?;
6308        __struct.vendor_id = buf.get_u16_le()?;
6309        __struct.product_id = buf.get_u16_le()?;
6310        for v in &mut __struct.flight_custom_version {
6311            let val = buf.get_u8()?;
6312            *v = val;
6313        }
6314        for v in &mut __struct.middleware_custom_version {
6315            let val = buf.get_u8()?;
6316            *v = val;
6317        }
6318        for v in &mut __struct.os_custom_version {
6319            let val = buf.get_u8()?;
6320            *v = val;
6321        }
6322        for v in &mut __struct.uid2 {
6323            let val = buf.get_u8()?;
6324            *v = val;
6325        }
6326        Ok(__struct)
6327    }
6328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6329        let mut __tmp = BytesMut::new(bytes);
6330        #[allow(clippy::absurd_extreme_comparisons)]
6331        #[allow(unused_comparisons)]
6332        if __tmp.remaining() < Self::ENCODED_LEN {
6333            panic!(
6334                "buffer is too small (need {} bytes, but got {})",
6335                Self::ENCODED_LEN,
6336                __tmp.remaining(),
6337            )
6338        }
6339        __tmp.put_u64_le(self.capabilities.bits() as u64);
6340        __tmp.put_u64_le(self.uid);
6341        __tmp.put_u32_le(self.flight_sw_version);
6342        __tmp.put_u32_le(self.middleware_sw_version);
6343        __tmp.put_u32_le(self.os_sw_version);
6344        __tmp.put_u32_le(self.board_version);
6345        __tmp.put_u16_le(self.vendor_id);
6346        __tmp.put_u16_le(self.product_id);
6347        for val in &self.flight_custom_version {
6348            __tmp.put_u8(*val);
6349        }
6350        for val in &self.middleware_custom_version {
6351            __tmp.put_u8(*val);
6352        }
6353        for val in &self.os_custom_version {
6354            __tmp.put_u8(*val);
6355        }
6356        if matches!(version, MavlinkVersion::V2) {
6357            for val in &self.uid2 {
6358                __tmp.put_u8(*val);
6359            }
6360            let len = __tmp.len();
6361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6362        } else {
6363            __tmp.len()
6364        }
6365    }
6366}
6367#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6368#[doc = ""]
6369#[doc = "ID: 435"]
6370#[derive(Debug, Clone, PartialEq)]
6371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6373#[cfg_attr(feature = "ts", derive(TS))]
6374#[cfg_attr(feature = "ts", ts(export))]
6375pub struct AVAILABLE_MODES_DATA {
6376    #[doc = "A bitfield for use for autopilot-specific flags"]
6377    pub custom_mode: u32,
6378    #[doc = "Mode properties."]
6379    pub properties: MavModeProperty,
6380    #[doc = "The total number of available modes for the current vehicle type."]
6381    pub number_modes: u8,
6382    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6383    pub mode_index: u8,
6384    #[doc = "Standard mode."]
6385    pub standard_mode: MavStandardMode,
6386    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6387    #[cfg_attr(feature = "ts", ts(type = "string"))]
6388    pub mode_name: CharArray<35>,
6389}
6390impl AVAILABLE_MODES_DATA {
6391    pub const ENCODED_LEN: usize = 46usize;
6392    pub const DEFAULT: Self = Self {
6393        custom_mode: 0_u32,
6394        properties: MavModeProperty::DEFAULT,
6395        number_modes: 0_u8,
6396        mode_index: 0_u8,
6397        standard_mode: MavStandardMode::DEFAULT,
6398        mode_name: CharArray::new([0_u8; 35usize]),
6399    };
6400    #[cfg(feature = "arbitrary")]
6401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6402        use arbitrary::{Arbitrary, Unstructured};
6403        let mut buf = [0u8; 1024];
6404        rng.fill_bytes(&mut buf);
6405        let mut unstructured = Unstructured::new(&buf);
6406        Self::arbitrary(&mut unstructured).unwrap_or_default()
6407    }
6408}
6409impl Default for AVAILABLE_MODES_DATA {
6410    fn default() -> Self {
6411        Self::DEFAULT.clone()
6412    }
6413}
6414impl MessageData for AVAILABLE_MODES_DATA {
6415    type Message = MavMessage;
6416    const ID: u32 = 435u32;
6417    const NAME: &'static str = "AVAILABLE_MODES";
6418    const EXTRA_CRC: u8 = 134u8;
6419    const ENCODED_LEN: usize = 46usize;
6420    fn deser(
6421        _version: MavlinkVersion,
6422        __input: &[u8],
6423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6424        let avail_len = __input.len();
6425        let mut payload_buf = [0; Self::ENCODED_LEN];
6426        let mut buf = if avail_len < Self::ENCODED_LEN {
6427            payload_buf[0..avail_len].copy_from_slice(__input);
6428            Bytes::new(&payload_buf)
6429        } else {
6430            Bytes::new(__input)
6431        };
6432        let mut __struct = Self::default();
6433        __struct.custom_mode = buf.get_u32_le()?;
6434        let tmp = buf.get_u32_le()?;
6435        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6436            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6437            flag_type: "MavModeProperty",
6438            value: tmp as u64,
6439        })?;
6440        __struct.number_modes = buf.get_u8()?;
6441        __struct.mode_index = buf.get_u8()?;
6442        let tmp = buf.get_u8()?;
6443        __struct.standard_mode =
6444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6445                enum_type: "MavStandardMode",
6446                value: tmp as u64,
6447            })?;
6448        let mut tmp = [0_u8; 35usize];
6449        for v in &mut tmp {
6450            *v = buf.get_u8()?;
6451        }
6452        __struct.mode_name = CharArray::new(tmp);
6453        Ok(__struct)
6454    }
6455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6456        let mut __tmp = BytesMut::new(bytes);
6457        #[allow(clippy::absurd_extreme_comparisons)]
6458        #[allow(unused_comparisons)]
6459        if __tmp.remaining() < Self::ENCODED_LEN {
6460            panic!(
6461                "buffer is too small (need {} bytes, but got {})",
6462                Self::ENCODED_LEN,
6463                __tmp.remaining(),
6464            )
6465        }
6466        __tmp.put_u32_le(self.custom_mode);
6467        __tmp.put_u32_le(self.properties.bits() as u32);
6468        __tmp.put_u8(self.number_modes);
6469        __tmp.put_u8(self.mode_index);
6470        __tmp.put_u8(self.standard_mode as u8);
6471        for val in &self.mode_name {
6472            __tmp.put_u8(*val);
6473        }
6474        if matches!(version, MavlinkVersion::V2) {
6475            let len = __tmp.len();
6476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6477        } else {
6478            __tmp.len()
6479        }
6480    }
6481}
6482#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6483#[doc = ""]
6484#[doc = "ID: 437"]
6485#[derive(Debug, Clone, PartialEq)]
6486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6488#[cfg_attr(feature = "ts", derive(TS))]
6489#[cfg_attr(feature = "ts", ts(export))]
6490pub struct AVAILABLE_MODES_MONITOR_DATA {
6491    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6492    pub seq: u8,
6493}
6494impl AVAILABLE_MODES_MONITOR_DATA {
6495    pub const ENCODED_LEN: usize = 1usize;
6496    pub const DEFAULT: Self = Self { seq: 0_u8 };
6497    #[cfg(feature = "arbitrary")]
6498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6499        use arbitrary::{Arbitrary, Unstructured};
6500        let mut buf = [0u8; 1024];
6501        rng.fill_bytes(&mut buf);
6502        let mut unstructured = Unstructured::new(&buf);
6503        Self::arbitrary(&mut unstructured).unwrap_or_default()
6504    }
6505}
6506impl Default for AVAILABLE_MODES_MONITOR_DATA {
6507    fn default() -> Self {
6508        Self::DEFAULT.clone()
6509    }
6510}
6511impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6512    type Message = MavMessage;
6513    const ID: u32 = 437u32;
6514    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6515    const EXTRA_CRC: u8 = 30u8;
6516    const ENCODED_LEN: usize = 1usize;
6517    fn deser(
6518        _version: MavlinkVersion,
6519        __input: &[u8],
6520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6521        let avail_len = __input.len();
6522        let mut payload_buf = [0; Self::ENCODED_LEN];
6523        let mut buf = if avail_len < Self::ENCODED_LEN {
6524            payload_buf[0..avail_len].copy_from_slice(__input);
6525            Bytes::new(&payload_buf)
6526        } else {
6527            Bytes::new(__input)
6528        };
6529        let mut __struct = Self::default();
6530        __struct.seq = buf.get_u8()?;
6531        Ok(__struct)
6532    }
6533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6534        let mut __tmp = BytesMut::new(bytes);
6535        #[allow(clippy::absurd_extreme_comparisons)]
6536        #[allow(unused_comparisons)]
6537        if __tmp.remaining() < Self::ENCODED_LEN {
6538            panic!(
6539                "buffer is too small (need {} bytes, but got {})",
6540                Self::ENCODED_LEN,
6541                __tmp.remaining(),
6542            )
6543        }
6544        __tmp.put_u8(self.seq);
6545        if matches!(version, MavlinkVersion::V2) {
6546            let len = __tmp.len();
6547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6548        } else {
6549            __tmp.len()
6550        }
6551    }
6552}
6553#[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6554#[doc = ""]
6555#[doc = "ID: 60052"]
6556#[derive(Debug, Clone, PartialEq)]
6557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6559#[cfg_attr(feature = "ts", derive(TS))]
6560#[cfg_attr(feature = "ts", ts(export))]
6561pub struct AVSS_DRONE_IMU_DATA {
6562    #[doc = "Timestamp (time since FC boot)."]
6563    pub time_boot_ms: u32,
6564    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
6565    pub q1: f32,
6566    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
6567    pub q2: f32,
6568    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
6569    pub q3: f32,
6570    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
6571    pub q4: f32,
6572    #[doc = "X acceleration"]
6573    pub xacc: f32,
6574    #[doc = "Y acceleration"]
6575    pub yacc: f32,
6576    #[doc = "Z acceleration"]
6577    pub zacc: f32,
6578    #[doc = "Angular speed around X axis"]
6579    pub xgyro: f32,
6580    #[doc = "Angular speed around Y axis"]
6581    pub ygyro: f32,
6582    #[doc = "Angular speed around Z axis"]
6583    pub zgyro: f32,
6584}
6585impl AVSS_DRONE_IMU_DATA {
6586    pub const ENCODED_LEN: usize = 44usize;
6587    pub const DEFAULT: Self = Self {
6588        time_boot_ms: 0_u32,
6589        q1: 0.0_f32,
6590        q2: 0.0_f32,
6591        q3: 0.0_f32,
6592        q4: 0.0_f32,
6593        xacc: 0.0_f32,
6594        yacc: 0.0_f32,
6595        zacc: 0.0_f32,
6596        xgyro: 0.0_f32,
6597        ygyro: 0.0_f32,
6598        zgyro: 0.0_f32,
6599    };
6600    #[cfg(feature = "arbitrary")]
6601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6602        use arbitrary::{Arbitrary, Unstructured};
6603        let mut buf = [0u8; 1024];
6604        rng.fill_bytes(&mut buf);
6605        let mut unstructured = Unstructured::new(&buf);
6606        Self::arbitrary(&mut unstructured).unwrap_or_default()
6607    }
6608}
6609impl Default for AVSS_DRONE_IMU_DATA {
6610    fn default() -> Self {
6611        Self::DEFAULT.clone()
6612    }
6613}
6614impl MessageData for AVSS_DRONE_IMU_DATA {
6615    type Message = MavMessage;
6616    const ID: u32 = 60052u32;
6617    const NAME: &'static str = "AVSS_DRONE_IMU";
6618    const EXTRA_CRC: u8 = 101u8;
6619    const ENCODED_LEN: usize = 44usize;
6620    fn deser(
6621        _version: MavlinkVersion,
6622        __input: &[u8],
6623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6624        let avail_len = __input.len();
6625        let mut payload_buf = [0; Self::ENCODED_LEN];
6626        let mut buf = if avail_len < Self::ENCODED_LEN {
6627            payload_buf[0..avail_len].copy_from_slice(__input);
6628            Bytes::new(&payload_buf)
6629        } else {
6630            Bytes::new(__input)
6631        };
6632        let mut __struct = Self::default();
6633        __struct.time_boot_ms = buf.get_u32_le()?;
6634        __struct.q1 = buf.get_f32_le()?;
6635        __struct.q2 = buf.get_f32_le()?;
6636        __struct.q3 = buf.get_f32_le()?;
6637        __struct.q4 = buf.get_f32_le()?;
6638        __struct.xacc = buf.get_f32_le()?;
6639        __struct.yacc = buf.get_f32_le()?;
6640        __struct.zacc = buf.get_f32_le()?;
6641        __struct.xgyro = buf.get_f32_le()?;
6642        __struct.ygyro = buf.get_f32_le()?;
6643        __struct.zgyro = buf.get_f32_le()?;
6644        Ok(__struct)
6645    }
6646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6647        let mut __tmp = BytesMut::new(bytes);
6648        #[allow(clippy::absurd_extreme_comparisons)]
6649        #[allow(unused_comparisons)]
6650        if __tmp.remaining() < Self::ENCODED_LEN {
6651            panic!(
6652                "buffer is too small (need {} bytes, but got {})",
6653                Self::ENCODED_LEN,
6654                __tmp.remaining(),
6655            )
6656        }
6657        __tmp.put_u32_le(self.time_boot_ms);
6658        __tmp.put_f32_le(self.q1);
6659        __tmp.put_f32_le(self.q2);
6660        __tmp.put_f32_le(self.q3);
6661        __tmp.put_f32_le(self.q4);
6662        __tmp.put_f32_le(self.xacc);
6663        __tmp.put_f32_le(self.yacc);
6664        __tmp.put_f32_le(self.zacc);
6665        __tmp.put_f32_le(self.xgyro);
6666        __tmp.put_f32_le(self.ygyro);
6667        __tmp.put_f32_le(self.zgyro);
6668        if matches!(version, MavlinkVersion::V2) {
6669            let len = __tmp.len();
6670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6671        } else {
6672            __tmp.len()
6673        }
6674    }
6675}
6676#[doc = "Drone operation mode."]
6677#[doc = ""]
6678#[doc = "ID: 60053"]
6679#[derive(Debug, Clone, PartialEq)]
6680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6682#[cfg_attr(feature = "ts", derive(TS))]
6683#[cfg_attr(feature = "ts", ts(export))]
6684pub struct AVSS_DRONE_OPERATION_MODE_DATA {
6685    #[doc = "Timestamp (time since FC boot)."]
6686    pub time_boot_ms: u32,
6687    #[doc = "DJI M300 operation mode"]
6688    pub M300_operation_mode: u8,
6689    #[doc = "horsefly operation mode"]
6690    pub horsefly_operation_mode: u8,
6691}
6692impl AVSS_DRONE_OPERATION_MODE_DATA {
6693    pub const ENCODED_LEN: usize = 6usize;
6694    pub const DEFAULT: Self = Self {
6695        time_boot_ms: 0_u32,
6696        M300_operation_mode: 0_u8,
6697        horsefly_operation_mode: 0_u8,
6698    };
6699    #[cfg(feature = "arbitrary")]
6700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6701        use arbitrary::{Arbitrary, Unstructured};
6702        let mut buf = [0u8; 1024];
6703        rng.fill_bytes(&mut buf);
6704        let mut unstructured = Unstructured::new(&buf);
6705        Self::arbitrary(&mut unstructured).unwrap_or_default()
6706    }
6707}
6708impl Default for AVSS_DRONE_OPERATION_MODE_DATA {
6709    fn default() -> Self {
6710        Self::DEFAULT.clone()
6711    }
6712}
6713impl MessageData for AVSS_DRONE_OPERATION_MODE_DATA {
6714    type Message = MavMessage;
6715    const ID: u32 = 60053u32;
6716    const NAME: &'static str = "AVSS_DRONE_OPERATION_MODE";
6717    const EXTRA_CRC: u8 = 45u8;
6718    const ENCODED_LEN: usize = 6usize;
6719    fn deser(
6720        _version: MavlinkVersion,
6721        __input: &[u8],
6722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6723        let avail_len = __input.len();
6724        let mut payload_buf = [0; Self::ENCODED_LEN];
6725        let mut buf = if avail_len < Self::ENCODED_LEN {
6726            payload_buf[0..avail_len].copy_from_slice(__input);
6727            Bytes::new(&payload_buf)
6728        } else {
6729            Bytes::new(__input)
6730        };
6731        let mut __struct = Self::default();
6732        __struct.time_boot_ms = buf.get_u32_le()?;
6733        __struct.M300_operation_mode = buf.get_u8()?;
6734        __struct.horsefly_operation_mode = buf.get_u8()?;
6735        Ok(__struct)
6736    }
6737    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6738        let mut __tmp = BytesMut::new(bytes);
6739        #[allow(clippy::absurd_extreme_comparisons)]
6740        #[allow(unused_comparisons)]
6741        if __tmp.remaining() < Self::ENCODED_LEN {
6742            panic!(
6743                "buffer is too small (need {} bytes, but got {})",
6744                Self::ENCODED_LEN,
6745                __tmp.remaining(),
6746            )
6747        }
6748        __tmp.put_u32_le(self.time_boot_ms);
6749        __tmp.put_u8(self.M300_operation_mode);
6750        __tmp.put_u8(self.horsefly_operation_mode);
6751        if matches!(version, MavlinkVersion::V2) {
6752            let len = __tmp.len();
6753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6754        } else {
6755            __tmp.len()
6756        }
6757    }
6758}
6759#[doc = "Drone position."]
6760#[doc = ""]
6761#[doc = "ID: 60051"]
6762#[derive(Debug, Clone, PartialEq)]
6763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6765#[cfg_attr(feature = "ts", derive(TS))]
6766#[cfg_attr(feature = "ts", ts(export))]
6767pub struct AVSS_DRONE_POSITION_DATA {
6768    #[doc = "Timestamp (time since FC boot)."]
6769    pub time_boot_ms: u32,
6770    #[doc = "Latitude, expressed"]
6771    pub lat: i32,
6772    #[doc = "Longitude, expressed"]
6773    pub lon: i32,
6774    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
6775    pub alt: i32,
6776    #[doc = "Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar"]
6777    pub ground_alt: f32,
6778    #[doc = "This altitude is measured by a barometer"]
6779    pub barometer_alt: f32,
6780}
6781impl AVSS_DRONE_POSITION_DATA {
6782    pub const ENCODED_LEN: usize = 24usize;
6783    pub const DEFAULT: Self = Self {
6784        time_boot_ms: 0_u32,
6785        lat: 0_i32,
6786        lon: 0_i32,
6787        alt: 0_i32,
6788        ground_alt: 0.0_f32,
6789        barometer_alt: 0.0_f32,
6790    };
6791    #[cfg(feature = "arbitrary")]
6792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6793        use arbitrary::{Arbitrary, Unstructured};
6794        let mut buf = [0u8; 1024];
6795        rng.fill_bytes(&mut buf);
6796        let mut unstructured = Unstructured::new(&buf);
6797        Self::arbitrary(&mut unstructured).unwrap_or_default()
6798    }
6799}
6800impl Default for AVSS_DRONE_POSITION_DATA {
6801    fn default() -> Self {
6802        Self::DEFAULT.clone()
6803    }
6804}
6805impl MessageData for AVSS_DRONE_POSITION_DATA {
6806    type Message = MavMessage;
6807    const ID: u32 = 60051u32;
6808    const NAME: &'static str = "AVSS_DRONE_POSITION";
6809    const EXTRA_CRC: u8 = 245u8;
6810    const ENCODED_LEN: usize = 24usize;
6811    fn deser(
6812        _version: MavlinkVersion,
6813        __input: &[u8],
6814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6815        let avail_len = __input.len();
6816        let mut payload_buf = [0; Self::ENCODED_LEN];
6817        let mut buf = if avail_len < Self::ENCODED_LEN {
6818            payload_buf[0..avail_len].copy_from_slice(__input);
6819            Bytes::new(&payload_buf)
6820        } else {
6821            Bytes::new(__input)
6822        };
6823        let mut __struct = Self::default();
6824        __struct.time_boot_ms = buf.get_u32_le()?;
6825        __struct.lat = buf.get_i32_le()?;
6826        __struct.lon = buf.get_i32_le()?;
6827        __struct.alt = buf.get_i32_le()?;
6828        __struct.ground_alt = buf.get_f32_le()?;
6829        __struct.barometer_alt = buf.get_f32_le()?;
6830        Ok(__struct)
6831    }
6832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6833        let mut __tmp = BytesMut::new(bytes);
6834        #[allow(clippy::absurd_extreme_comparisons)]
6835        #[allow(unused_comparisons)]
6836        if __tmp.remaining() < Self::ENCODED_LEN {
6837            panic!(
6838                "buffer is too small (need {} bytes, but got {})",
6839                Self::ENCODED_LEN,
6840                __tmp.remaining(),
6841            )
6842        }
6843        __tmp.put_u32_le(self.time_boot_ms);
6844        __tmp.put_i32_le(self.lat);
6845        __tmp.put_i32_le(self.lon);
6846        __tmp.put_i32_le(self.alt);
6847        __tmp.put_f32_le(self.ground_alt);
6848        __tmp.put_f32_le(self.barometer_alt);
6849        if matches!(version, MavlinkVersion::V2) {
6850            let len = __tmp.len();
6851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6852        } else {
6853            __tmp.len()
6854        }
6855    }
6856}
6857#[doc = "AVSS PRS system status."]
6858#[doc = ""]
6859#[doc = "ID: 60050"]
6860#[derive(Debug, Clone, PartialEq)]
6861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6863#[cfg_attr(feature = "ts", derive(TS))]
6864#[cfg_attr(feature = "ts", ts(export))]
6865pub struct AVSS_PRS_SYS_STATUS_DATA {
6866    #[doc = "Timestamp (time since PRS boot)."]
6867    pub time_boot_ms: u32,
6868    #[doc = "PRS error statuses"]
6869    pub error_status: u32,
6870    #[doc = "Estimated battery run-time without a remote connection and PRS battery voltage"]
6871    pub battery_status: u32,
6872    #[doc = "PRS arm statuses"]
6873    pub arm_status: u8,
6874    #[doc = "PRS battery charge statuses"]
6875    pub charge_status: u8,
6876}
6877impl AVSS_PRS_SYS_STATUS_DATA {
6878    pub const ENCODED_LEN: usize = 14usize;
6879    pub const DEFAULT: Self = Self {
6880        time_boot_ms: 0_u32,
6881        error_status: 0_u32,
6882        battery_status: 0_u32,
6883        arm_status: 0_u8,
6884        charge_status: 0_u8,
6885    };
6886    #[cfg(feature = "arbitrary")]
6887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6888        use arbitrary::{Arbitrary, Unstructured};
6889        let mut buf = [0u8; 1024];
6890        rng.fill_bytes(&mut buf);
6891        let mut unstructured = Unstructured::new(&buf);
6892        Self::arbitrary(&mut unstructured).unwrap_or_default()
6893    }
6894}
6895impl Default for AVSS_PRS_SYS_STATUS_DATA {
6896    fn default() -> Self {
6897        Self::DEFAULT.clone()
6898    }
6899}
6900impl MessageData for AVSS_PRS_SYS_STATUS_DATA {
6901    type Message = MavMessage;
6902    const ID: u32 = 60050u32;
6903    const NAME: &'static str = "AVSS_PRS_SYS_STATUS";
6904    const EXTRA_CRC: u8 = 220u8;
6905    const ENCODED_LEN: usize = 14usize;
6906    fn deser(
6907        _version: MavlinkVersion,
6908        __input: &[u8],
6909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6910        let avail_len = __input.len();
6911        let mut payload_buf = [0; Self::ENCODED_LEN];
6912        let mut buf = if avail_len < Self::ENCODED_LEN {
6913            payload_buf[0..avail_len].copy_from_slice(__input);
6914            Bytes::new(&payload_buf)
6915        } else {
6916            Bytes::new(__input)
6917        };
6918        let mut __struct = Self::default();
6919        __struct.time_boot_ms = buf.get_u32_le()?;
6920        __struct.error_status = buf.get_u32_le()?;
6921        __struct.battery_status = buf.get_u32_le()?;
6922        __struct.arm_status = buf.get_u8()?;
6923        __struct.charge_status = buf.get_u8()?;
6924        Ok(__struct)
6925    }
6926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6927        let mut __tmp = BytesMut::new(bytes);
6928        #[allow(clippy::absurd_extreme_comparisons)]
6929        #[allow(unused_comparisons)]
6930        if __tmp.remaining() < Self::ENCODED_LEN {
6931            panic!(
6932                "buffer is too small (need {} bytes, but got {})",
6933                Self::ENCODED_LEN,
6934                __tmp.remaining(),
6935            )
6936        }
6937        __tmp.put_u32_le(self.time_boot_ms);
6938        __tmp.put_u32_le(self.error_status);
6939        __tmp.put_u32_le(self.battery_status);
6940        __tmp.put_u8(self.arm_status);
6941        __tmp.put_u8(self.charge_status);
6942        if matches!(version, MavlinkVersion::V2) {
6943            let len = __tmp.len();
6944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6945        } else {
6946            __tmp.len()
6947        }
6948    }
6949}
6950#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6951#[doc = ""]
6952#[doc = "ID: 372"]
6953#[derive(Debug, Clone, PartialEq)]
6954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6956#[cfg_attr(feature = "ts", derive(TS))]
6957#[cfg_attr(feature = "ts", ts(export))]
6958pub struct BATTERY_INFO_DATA {
6959    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6960    pub discharge_minimum_voltage: f32,
6961    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6962    pub charging_minimum_voltage: f32,
6963    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6964    pub resting_minimum_voltage: f32,
6965    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6966    pub charging_maximum_voltage: f32,
6967    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6968    pub charging_maximum_current: f32,
6969    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6970    pub nominal_voltage: f32,
6971    #[doc = "Maximum pack discharge current. 0: field not provided."]
6972    pub discharge_maximum_current: f32,
6973    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6974    pub discharge_maximum_burst_current: f32,
6975    #[doc = "Fully charged design capacity. 0: field not provided."]
6976    pub design_capacity: f32,
6977    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6978    pub full_charge_capacity: f32,
6979    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6980    pub cycle_count: u16,
6981    #[doc = "Battery weight. 0: field not provided."]
6982    pub weight: u16,
6983    #[doc = "Battery ID"]
6984    pub id: u8,
6985    #[doc = "Function of the battery."]
6986    pub battery_function: MavBatteryFunction,
6987    #[doc = "Type (chemistry) of the battery."]
6988    pub mavtype: MavBatteryType,
6989    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6990    pub state_of_health: u8,
6991    #[doc = "Number of battery cells in series. 0: field not provided."]
6992    pub cells_in_series: u8,
6993    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6994    #[cfg_attr(feature = "ts", ts(type = "string"))]
6995    pub manufacture_date: CharArray<9>,
6996    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6997    #[cfg_attr(feature = "ts", ts(type = "string"))]
6998    pub serial_number: CharArray<32>,
6999    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7000    #[cfg_attr(feature = "ts", ts(type = "string"))]
7001    pub name: CharArray<50>,
7002}
7003impl BATTERY_INFO_DATA {
7004    pub const ENCODED_LEN: usize = 140usize;
7005    pub const DEFAULT: Self = Self {
7006        discharge_minimum_voltage: 0.0_f32,
7007        charging_minimum_voltage: 0.0_f32,
7008        resting_minimum_voltage: 0.0_f32,
7009        charging_maximum_voltage: 0.0_f32,
7010        charging_maximum_current: 0.0_f32,
7011        nominal_voltage: 0.0_f32,
7012        discharge_maximum_current: 0.0_f32,
7013        discharge_maximum_burst_current: 0.0_f32,
7014        design_capacity: 0.0_f32,
7015        full_charge_capacity: 0.0_f32,
7016        cycle_count: 0_u16,
7017        weight: 0_u16,
7018        id: 0_u8,
7019        battery_function: MavBatteryFunction::DEFAULT,
7020        mavtype: MavBatteryType::DEFAULT,
7021        state_of_health: 0_u8,
7022        cells_in_series: 0_u8,
7023        manufacture_date: CharArray::new([0_u8; 9usize]),
7024        serial_number: CharArray::new([0_u8; 32usize]),
7025        name: CharArray::new([0_u8; 50usize]),
7026    };
7027    #[cfg(feature = "arbitrary")]
7028    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7029        use arbitrary::{Arbitrary, Unstructured};
7030        let mut buf = [0u8; 1024];
7031        rng.fill_bytes(&mut buf);
7032        let mut unstructured = Unstructured::new(&buf);
7033        Self::arbitrary(&mut unstructured).unwrap_or_default()
7034    }
7035}
7036impl Default for BATTERY_INFO_DATA {
7037    fn default() -> Self {
7038        Self::DEFAULT.clone()
7039    }
7040}
7041impl MessageData for BATTERY_INFO_DATA {
7042    type Message = MavMessage;
7043    const ID: u32 = 372u32;
7044    const NAME: &'static str = "BATTERY_INFO";
7045    const EXTRA_CRC: u8 = 26u8;
7046    const ENCODED_LEN: usize = 140usize;
7047    fn deser(
7048        _version: MavlinkVersion,
7049        __input: &[u8],
7050    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7051        let avail_len = __input.len();
7052        let mut payload_buf = [0; Self::ENCODED_LEN];
7053        let mut buf = if avail_len < Self::ENCODED_LEN {
7054            payload_buf[0..avail_len].copy_from_slice(__input);
7055            Bytes::new(&payload_buf)
7056        } else {
7057            Bytes::new(__input)
7058        };
7059        let mut __struct = Self::default();
7060        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
7061        __struct.charging_minimum_voltage = buf.get_f32_le()?;
7062        __struct.resting_minimum_voltage = buf.get_f32_le()?;
7063        __struct.charging_maximum_voltage = buf.get_f32_le()?;
7064        __struct.charging_maximum_current = buf.get_f32_le()?;
7065        __struct.nominal_voltage = buf.get_f32_le()?;
7066        __struct.discharge_maximum_current = buf.get_f32_le()?;
7067        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
7068        __struct.design_capacity = buf.get_f32_le()?;
7069        __struct.full_charge_capacity = buf.get_f32_le()?;
7070        __struct.cycle_count = buf.get_u16_le()?;
7071        __struct.weight = buf.get_u16_le()?;
7072        __struct.id = buf.get_u8()?;
7073        let tmp = buf.get_u8()?;
7074        __struct.battery_function =
7075            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7076                enum_type: "MavBatteryFunction",
7077                value: tmp as u64,
7078            })?;
7079        let tmp = buf.get_u8()?;
7080        __struct.mavtype =
7081            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7082                enum_type: "MavBatteryType",
7083                value: tmp as u64,
7084            })?;
7085        __struct.state_of_health = buf.get_u8()?;
7086        __struct.cells_in_series = buf.get_u8()?;
7087        let mut tmp = [0_u8; 9usize];
7088        for v in &mut tmp {
7089            *v = buf.get_u8()?;
7090        }
7091        __struct.manufacture_date = CharArray::new(tmp);
7092        let mut tmp = [0_u8; 32usize];
7093        for v in &mut tmp {
7094            *v = buf.get_u8()?;
7095        }
7096        __struct.serial_number = CharArray::new(tmp);
7097        let mut tmp = [0_u8; 50usize];
7098        for v in &mut tmp {
7099            *v = buf.get_u8()?;
7100        }
7101        __struct.name = CharArray::new(tmp);
7102        Ok(__struct)
7103    }
7104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7105        let mut __tmp = BytesMut::new(bytes);
7106        #[allow(clippy::absurd_extreme_comparisons)]
7107        #[allow(unused_comparisons)]
7108        if __tmp.remaining() < Self::ENCODED_LEN {
7109            panic!(
7110                "buffer is too small (need {} bytes, but got {})",
7111                Self::ENCODED_LEN,
7112                __tmp.remaining(),
7113            )
7114        }
7115        __tmp.put_f32_le(self.discharge_minimum_voltage);
7116        __tmp.put_f32_le(self.charging_minimum_voltage);
7117        __tmp.put_f32_le(self.resting_minimum_voltage);
7118        __tmp.put_f32_le(self.charging_maximum_voltage);
7119        __tmp.put_f32_le(self.charging_maximum_current);
7120        __tmp.put_f32_le(self.nominal_voltage);
7121        __tmp.put_f32_le(self.discharge_maximum_current);
7122        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7123        __tmp.put_f32_le(self.design_capacity);
7124        __tmp.put_f32_le(self.full_charge_capacity);
7125        __tmp.put_u16_le(self.cycle_count);
7126        __tmp.put_u16_le(self.weight);
7127        __tmp.put_u8(self.id);
7128        __tmp.put_u8(self.battery_function as u8);
7129        __tmp.put_u8(self.mavtype as u8);
7130        __tmp.put_u8(self.state_of_health);
7131        __tmp.put_u8(self.cells_in_series);
7132        for val in &self.manufacture_date {
7133            __tmp.put_u8(*val);
7134        }
7135        for val in &self.serial_number {
7136            __tmp.put_u8(*val);
7137        }
7138        for val in &self.name {
7139            __tmp.put_u8(*val);
7140        }
7141        if matches!(version, MavlinkVersion::V2) {
7142            let len = __tmp.len();
7143            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7144        } else {
7145            __tmp.len()
7146        }
7147    }
7148}
7149#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7150#[doc = ""]
7151#[doc = "ID: 147"]
7152#[derive(Debug, Clone, PartialEq)]
7153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7155#[cfg_attr(feature = "ts", derive(TS))]
7156#[cfg_attr(feature = "ts", ts(export))]
7157pub struct BATTERY_STATUS_DATA {
7158    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7159    pub current_consumed: i32,
7160    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7161    pub energy_consumed: i32,
7162    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7163    pub temperature: i16,
7164    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7165    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7166    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7167    pub voltages: [u16; 10],
7168    #[doc = "Battery current, -1: autopilot does not measure the current"]
7169    pub current_battery: i16,
7170    #[doc = "Battery ID"]
7171    pub id: u8,
7172    #[doc = "Function of the battery"]
7173    pub battery_function: MavBatteryFunction,
7174    #[doc = "Type (chemistry) of the battery"]
7175    pub mavtype: MavBatteryType,
7176    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7177    pub battery_remaining: i8,
7178    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7179    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7180    pub time_remaining: i32,
7181    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7182    #[cfg_attr(feature = "serde", serde(default))]
7183    pub charge_state: MavBatteryChargeState,
7184    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7185    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7186    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7187    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7188    pub voltages_ext: [u16; 4],
7189    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7190    #[cfg_attr(feature = "serde", serde(default))]
7191    pub mode: MavBatteryMode,
7192    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7193    #[cfg_attr(feature = "serde", serde(default))]
7194    pub fault_bitmask: MavBatteryFault,
7195}
7196impl BATTERY_STATUS_DATA {
7197    pub const ENCODED_LEN: usize = 54usize;
7198    pub const DEFAULT: Self = Self {
7199        current_consumed: 0_i32,
7200        energy_consumed: 0_i32,
7201        temperature: 0_i16,
7202        voltages: [0_u16; 10usize],
7203        current_battery: 0_i16,
7204        id: 0_u8,
7205        battery_function: MavBatteryFunction::DEFAULT,
7206        mavtype: MavBatteryType::DEFAULT,
7207        battery_remaining: 0_i8,
7208        time_remaining: 0_i32,
7209        charge_state: MavBatteryChargeState::DEFAULT,
7210        voltages_ext: [0_u16; 4usize],
7211        mode: MavBatteryMode::DEFAULT,
7212        fault_bitmask: MavBatteryFault::DEFAULT,
7213    };
7214    #[cfg(feature = "arbitrary")]
7215    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7216        use arbitrary::{Arbitrary, Unstructured};
7217        let mut buf = [0u8; 1024];
7218        rng.fill_bytes(&mut buf);
7219        let mut unstructured = Unstructured::new(&buf);
7220        Self::arbitrary(&mut unstructured).unwrap_or_default()
7221    }
7222}
7223impl Default for BATTERY_STATUS_DATA {
7224    fn default() -> Self {
7225        Self::DEFAULT.clone()
7226    }
7227}
7228impl MessageData for BATTERY_STATUS_DATA {
7229    type Message = MavMessage;
7230    const ID: u32 = 147u32;
7231    const NAME: &'static str = "BATTERY_STATUS";
7232    const EXTRA_CRC: u8 = 154u8;
7233    const ENCODED_LEN: usize = 54usize;
7234    fn deser(
7235        _version: MavlinkVersion,
7236        __input: &[u8],
7237    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7238        let avail_len = __input.len();
7239        let mut payload_buf = [0; Self::ENCODED_LEN];
7240        let mut buf = if avail_len < Self::ENCODED_LEN {
7241            payload_buf[0..avail_len].copy_from_slice(__input);
7242            Bytes::new(&payload_buf)
7243        } else {
7244            Bytes::new(__input)
7245        };
7246        let mut __struct = Self::default();
7247        __struct.current_consumed = buf.get_i32_le()?;
7248        __struct.energy_consumed = buf.get_i32_le()?;
7249        __struct.temperature = buf.get_i16_le()?;
7250        for v in &mut __struct.voltages {
7251            let val = buf.get_u16_le()?;
7252            *v = val;
7253        }
7254        __struct.current_battery = buf.get_i16_le()?;
7255        __struct.id = buf.get_u8()?;
7256        let tmp = buf.get_u8()?;
7257        __struct.battery_function =
7258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7259                enum_type: "MavBatteryFunction",
7260                value: tmp as u64,
7261            })?;
7262        let tmp = buf.get_u8()?;
7263        __struct.mavtype =
7264            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7265                enum_type: "MavBatteryType",
7266                value: tmp as u64,
7267            })?;
7268        __struct.battery_remaining = buf.get_i8()?;
7269        __struct.time_remaining = buf.get_i32_le()?;
7270        let tmp = buf.get_u8()?;
7271        __struct.charge_state =
7272            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7273                enum_type: "MavBatteryChargeState",
7274                value: tmp as u64,
7275            })?;
7276        for v in &mut __struct.voltages_ext {
7277            let val = buf.get_u16_le()?;
7278            *v = val;
7279        }
7280        let tmp = buf.get_u8()?;
7281        __struct.mode =
7282            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7283                enum_type: "MavBatteryMode",
7284                value: tmp as u64,
7285            })?;
7286        let tmp = buf.get_u32_le()?;
7287        __struct.fault_bitmask = MavBatteryFault::from_bits(
7288            tmp as <MavBatteryFault as Flags>::Bits,
7289        )
7290        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7291            flag_type: "MavBatteryFault",
7292            value: tmp as u64,
7293        })?;
7294        Ok(__struct)
7295    }
7296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7297        let mut __tmp = BytesMut::new(bytes);
7298        #[allow(clippy::absurd_extreme_comparisons)]
7299        #[allow(unused_comparisons)]
7300        if __tmp.remaining() < Self::ENCODED_LEN {
7301            panic!(
7302                "buffer is too small (need {} bytes, but got {})",
7303                Self::ENCODED_LEN,
7304                __tmp.remaining(),
7305            )
7306        }
7307        __tmp.put_i32_le(self.current_consumed);
7308        __tmp.put_i32_le(self.energy_consumed);
7309        __tmp.put_i16_le(self.temperature);
7310        for val in &self.voltages {
7311            __tmp.put_u16_le(*val);
7312        }
7313        __tmp.put_i16_le(self.current_battery);
7314        __tmp.put_u8(self.id);
7315        __tmp.put_u8(self.battery_function as u8);
7316        __tmp.put_u8(self.mavtype as u8);
7317        __tmp.put_i8(self.battery_remaining);
7318        if matches!(version, MavlinkVersion::V2) {
7319            __tmp.put_i32_le(self.time_remaining);
7320            __tmp.put_u8(self.charge_state as u8);
7321            for val in &self.voltages_ext {
7322                __tmp.put_u16_le(*val);
7323            }
7324            __tmp.put_u8(self.mode as u8);
7325            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
7326            let len = __tmp.len();
7327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7328        } else {
7329            __tmp.len()
7330        }
7331    }
7332}
7333#[doc = "Report button state change."]
7334#[doc = ""]
7335#[doc = "ID: 257"]
7336#[derive(Debug, Clone, PartialEq)]
7337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7339#[cfg_attr(feature = "ts", derive(TS))]
7340#[cfg_attr(feature = "ts", ts(export))]
7341pub struct BUTTON_CHANGE_DATA {
7342    #[doc = "Timestamp (time since system boot)."]
7343    pub time_boot_ms: u32,
7344    #[doc = "Time of last change of button state."]
7345    pub last_change_ms: u32,
7346    #[doc = "Bitmap for state of buttons."]
7347    pub state: u8,
7348}
7349impl BUTTON_CHANGE_DATA {
7350    pub const ENCODED_LEN: usize = 9usize;
7351    pub const DEFAULT: Self = Self {
7352        time_boot_ms: 0_u32,
7353        last_change_ms: 0_u32,
7354        state: 0_u8,
7355    };
7356    #[cfg(feature = "arbitrary")]
7357    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7358        use arbitrary::{Arbitrary, Unstructured};
7359        let mut buf = [0u8; 1024];
7360        rng.fill_bytes(&mut buf);
7361        let mut unstructured = Unstructured::new(&buf);
7362        Self::arbitrary(&mut unstructured).unwrap_or_default()
7363    }
7364}
7365impl Default for BUTTON_CHANGE_DATA {
7366    fn default() -> Self {
7367        Self::DEFAULT.clone()
7368    }
7369}
7370impl MessageData for BUTTON_CHANGE_DATA {
7371    type Message = MavMessage;
7372    const ID: u32 = 257u32;
7373    const NAME: &'static str = "BUTTON_CHANGE";
7374    const EXTRA_CRC: u8 = 131u8;
7375    const ENCODED_LEN: usize = 9usize;
7376    fn deser(
7377        _version: MavlinkVersion,
7378        __input: &[u8],
7379    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7380        let avail_len = __input.len();
7381        let mut payload_buf = [0; Self::ENCODED_LEN];
7382        let mut buf = if avail_len < Self::ENCODED_LEN {
7383            payload_buf[0..avail_len].copy_from_slice(__input);
7384            Bytes::new(&payload_buf)
7385        } else {
7386            Bytes::new(__input)
7387        };
7388        let mut __struct = Self::default();
7389        __struct.time_boot_ms = buf.get_u32_le()?;
7390        __struct.last_change_ms = buf.get_u32_le()?;
7391        __struct.state = buf.get_u8()?;
7392        Ok(__struct)
7393    }
7394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7395        let mut __tmp = BytesMut::new(bytes);
7396        #[allow(clippy::absurd_extreme_comparisons)]
7397        #[allow(unused_comparisons)]
7398        if __tmp.remaining() < Self::ENCODED_LEN {
7399            panic!(
7400                "buffer is too small (need {} bytes, but got {})",
7401                Self::ENCODED_LEN,
7402                __tmp.remaining(),
7403            )
7404        }
7405        __tmp.put_u32_le(self.time_boot_ms);
7406        __tmp.put_u32_le(self.last_change_ms);
7407        __tmp.put_u8(self.state);
7408        if matches!(version, MavlinkVersion::V2) {
7409            let len = __tmp.len();
7410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7411        } else {
7412            __tmp.len()
7413        }
7414    }
7415}
7416#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7417#[doc = ""]
7418#[doc = "ID: 262"]
7419#[derive(Debug, Clone, PartialEq)]
7420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7422#[cfg_attr(feature = "ts", derive(TS))]
7423#[cfg_attr(feature = "ts", ts(export))]
7424pub struct CAMERA_CAPTURE_STATUS_DATA {
7425    #[doc = "Timestamp (time since system boot)."]
7426    pub time_boot_ms: u32,
7427    #[doc = "Image capture interval"]
7428    pub image_interval: f32,
7429    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7430    pub recording_time_ms: u32,
7431    #[doc = "Available storage capacity."]
7432    pub available_capacity: f32,
7433    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7434    pub image_status: u8,
7435    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7436    pub video_status: u8,
7437    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7439    pub image_count: i32,
7440    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7442    pub camera_device_id: u8,
7443}
7444impl CAMERA_CAPTURE_STATUS_DATA {
7445    pub const ENCODED_LEN: usize = 23usize;
7446    pub const DEFAULT: Self = Self {
7447        time_boot_ms: 0_u32,
7448        image_interval: 0.0_f32,
7449        recording_time_ms: 0_u32,
7450        available_capacity: 0.0_f32,
7451        image_status: 0_u8,
7452        video_status: 0_u8,
7453        image_count: 0_i32,
7454        camera_device_id: 0_u8,
7455    };
7456    #[cfg(feature = "arbitrary")]
7457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7458        use arbitrary::{Arbitrary, Unstructured};
7459        let mut buf = [0u8; 1024];
7460        rng.fill_bytes(&mut buf);
7461        let mut unstructured = Unstructured::new(&buf);
7462        Self::arbitrary(&mut unstructured).unwrap_or_default()
7463    }
7464}
7465impl Default for CAMERA_CAPTURE_STATUS_DATA {
7466    fn default() -> Self {
7467        Self::DEFAULT.clone()
7468    }
7469}
7470impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7471    type Message = MavMessage;
7472    const ID: u32 = 262u32;
7473    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7474    const EXTRA_CRC: u8 = 12u8;
7475    const ENCODED_LEN: usize = 23usize;
7476    fn deser(
7477        _version: MavlinkVersion,
7478        __input: &[u8],
7479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7480        let avail_len = __input.len();
7481        let mut payload_buf = [0; Self::ENCODED_LEN];
7482        let mut buf = if avail_len < Self::ENCODED_LEN {
7483            payload_buf[0..avail_len].copy_from_slice(__input);
7484            Bytes::new(&payload_buf)
7485        } else {
7486            Bytes::new(__input)
7487        };
7488        let mut __struct = Self::default();
7489        __struct.time_boot_ms = buf.get_u32_le()?;
7490        __struct.image_interval = buf.get_f32_le()?;
7491        __struct.recording_time_ms = buf.get_u32_le()?;
7492        __struct.available_capacity = buf.get_f32_le()?;
7493        __struct.image_status = buf.get_u8()?;
7494        __struct.video_status = buf.get_u8()?;
7495        __struct.image_count = buf.get_i32_le()?;
7496        __struct.camera_device_id = buf.get_u8()?;
7497        Ok(__struct)
7498    }
7499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7500        let mut __tmp = BytesMut::new(bytes);
7501        #[allow(clippy::absurd_extreme_comparisons)]
7502        #[allow(unused_comparisons)]
7503        if __tmp.remaining() < Self::ENCODED_LEN {
7504            panic!(
7505                "buffer is too small (need {} bytes, but got {})",
7506                Self::ENCODED_LEN,
7507                __tmp.remaining(),
7508            )
7509        }
7510        __tmp.put_u32_le(self.time_boot_ms);
7511        __tmp.put_f32_le(self.image_interval);
7512        __tmp.put_u32_le(self.recording_time_ms);
7513        __tmp.put_f32_le(self.available_capacity);
7514        __tmp.put_u8(self.image_status);
7515        __tmp.put_u8(self.video_status);
7516        if matches!(version, MavlinkVersion::V2) {
7517            __tmp.put_i32_le(self.image_count);
7518            __tmp.put_u8(self.camera_device_id);
7519            let len = __tmp.len();
7520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7521        } else {
7522            __tmp.len()
7523        }
7524    }
7525}
7526#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7527#[doc = ""]
7528#[doc = "ID: 271"]
7529#[derive(Debug, Clone, PartialEq)]
7530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7532#[cfg_attr(feature = "ts", derive(TS))]
7533#[cfg_attr(feature = "ts", ts(export))]
7534pub struct CAMERA_FOV_STATUS_DATA {
7535    #[doc = "Timestamp (time since system boot)."]
7536    pub time_boot_ms: u32,
7537    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7538    pub lat_camera: i32,
7539    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7540    pub lon_camera: i32,
7541    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7542    pub alt_camera: i32,
7543    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7544    pub lat_image: i32,
7545    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7546    pub lon_image: i32,
7547    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7548    pub alt_image: i32,
7549    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7550    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7551    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7552    pub q: [f32; 4],
7553    #[doc = "Horizontal field of view (NaN if unknown)."]
7554    pub hfov: f32,
7555    #[doc = "Vertical field of view (NaN if unknown)."]
7556    pub vfov: f32,
7557    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7558    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7559    pub camera_device_id: u8,
7560}
7561impl CAMERA_FOV_STATUS_DATA {
7562    pub const ENCODED_LEN: usize = 53usize;
7563    pub const DEFAULT: Self = Self {
7564        time_boot_ms: 0_u32,
7565        lat_camera: 0_i32,
7566        lon_camera: 0_i32,
7567        alt_camera: 0_i32,
7568        lat_image: 0_i32,
7569        lon_image: 0_i32,
7570        alt_image: 0_i32,
7571        q: [0.0_f32; 4usize],
7572        hfov: 0.0_f32,
7573        vfov: 0.0_f32,
7574        camera_device_id: 0_u8,
7575    };
7576    #[cfg(feature = "arbitrary")]
7577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7578        use arbitrary::{Arbitrary, Unstructured};
7579        let mut buf = [0u8; 1024];
7580        rng.fill_bytes(&mut buf);
7581        let mut unstructured = Unstructured::new(&buf);
7582        Self::arbitrary(&mut unstructured).unwrap_or_default()
7583    }
7584}
7585impl Default for CAMERA_FOV_STATUS_DATA {
7586    fn default() -> Self {
7587        Self::DEFAULT.clone()
7588    }
7589}
7590impl MessageData for CAMERA_FOV_STATUS_DATA {
7591    type Message = MavMessage;
7592    const ID: u32 = 271u32;
7593    const NAME: &'static str = "CAMERA_FOV_STATUS";
7594    const EXTRA_CRC: u8 = 22u8;
7595    const ENCODED_LEN: usize = 53usize;
7596    fn deser(
7597        _version: MavlinkVersion,
7598        __input: &[u8],
7599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7600        let avail_len = __input.len();
7601        let mut payload_buf = [0; Self::ENCODED_LEN];
7602        let mut buf = if avail_len < Self::ENCODED_LEN {
7603            payload_buf[0..avail_len].copy_from_slice(__input);
7604            Bytes::new(&payload_buf)
7605        } else {
7606            Bytes::new(__input)
7607        };
7608        let mut __struct = Self::default();
7609        __struct.time_boot_ms = buf.get_u32_le()?;
7610        __struct.lat_camera = buf.get_i32_le()?;
7611        __struct.lon_camera = buf.get_i32_le()?;
7612        __struct.alt_camera = buf.get_i32_le()?;
7613        __struct.lat_image = buf.get_i32_le()?;
7614        __struct.lon_image = buf.get_i32_le()?;
7615        __struct.alt_image = buf.get_i32_le()?;
7616        for v in &mut __struct.q {
7617            let val = buf.get_f32_le()?;
7618            *v = val;
7619        }
7620        __struct.hfov = buf.get_f32_le()?;
7621        __struct.vfov = buf.get_f32_le()?;
7622        __struct.camera_device_id = buf.get_u8()?;
7623        Ok(__struct)
7624    }
7625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7626        let mut __tmp = BytesMut::new(bytes);
7627        #[allow(clippy::absurd_extreme_comparisons)]
7628        #[allow(unused_comparisons)]
7629        if __tmp.remaining() < Self::ENCODED_LEN {
7630            panic!(
7631                "buffer is too small (need {} bytes, but got {})",
7632                Self::ENCODED_LEN,
7633                __tmp.remaining(),
7634            )
7635        }
7636        __tmp.put_u32_le(self.time_boot_ms);
7637        __tmp.put_i32_le(self.lat_camera);
7638        __tmp.put_i32_le(self.lon_camera);
7639        __tmp.put_i32_le(self.alt_camera);
7640        __tmp.put_i32_le(self.lat_image);
7641        __tmp.put_i32_le(self.lon_image);
7642        __tmp.put_i32_le(self.alt_image);
7643        for val in &self.q {
7644            __tmp.put_f32_le(*val);
7645        }
7646        __tmp.put_f32_le(self.hfov);
7647        __tmp.put_f32_le(self.vfov);
7648        if matches!(version, MavlinkVersion::V2) {
7649            __tmp.put_u8(self.camera_device_id);
7650            let len = __tmp.len();
7651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7652        } else {
7653            __tmp.len()
7654        }
7655    }
7656}
7657#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7658#[doc = ""]
7659#[doc = "ID: 263"]
7660#[derive(Debug, Clone, PartialEq)]
7661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7663#[cfg_attr(feature = "ts", derive(TS))]
7664#[cfg_attr(feature = "ts", ts(export))]
7665pub struct CAMERA_IMAGE_CAPTURED_DATA {
7666    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7667    pub time_utc: u64,
7668    #[doc = "Timestamp (time since system boot)."]
7669    pub time_boot_ms: u32,
7670    #[doc = "Latitude where image was taken"]
7671    pub lat: i32,
7672    #[doc = "Longitude where capture was taken"]
7673    pub lon: i32,
7674    #[doc = "Altitude (MSL) where image was taken"]
7675    pub alt: i32,
7676    #[doc = "Altitude above ground"]
7677    pub relative_alt: i32,
7678    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7681    pub q: [f32; 4],
7682    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7683    pub image_index: i32,
7684    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7685    pub camera_id: u8,
7686    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7687    pub capture_result: i8,
7688    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7689    #[cfg_attr(feature = "ts", ts(type = "string"))]
7690    pub file_url: CharArray<205>,
7691}
7692impl CAMERA_IMAGE_CAPTURED_DATA {
7693    pub const ENCODED_LEN: usize = 255usize;
7694    pub const DEFAULT: Self = Self {
7695        time_utc: 0_u64,
7696        time_boot_ms: 0_u32,
7697        lat: 0_i32,
7698        lon: 0_i32,
7699        alt: 0_i32,
7700        relative_alt: 0_i32,
7701        q: [0.0_f32; 4usize],
7702        image_index: 0_i32,
7703        camera_id: 0_u8,
7704        capture_result: 0_i8,
7705        file_url: CharArray::new([0_u8; 205usize]),
7706    };
7707    #[cfg(feature = "arbitrary")]
7708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7709        use arbitrary::{Arbitrary, Unstructured};
7710        let mut buf = [0u8; 1024];
7711        rng.fill_bytes(&mut buf);
7712        let mut unstructured = Unstructured::new(&buf);
7713        Self::arbitrary(&mut unstructured).unwrap_or_default()
7714    }
7715}
7716impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7717    fn default() -> Self {
7718        Self::DEFAULT.clone()
7719    }
7720}
7721impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7722    type Message = MavMessage;
7723    const ID: u32 = 263u32;
7724    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7725    const EXTRA_CRC: u8 = 133u8;
7726    const ENCODED_LEN: usize = 255usize;
7727    fn deser(
7728        _version: MavlinkVersion,
7729        __input: &[u8],
7730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7731        let avail_len = __input.len();
7732        let mut payload_buf = [0; Self::ENCODED_LEN];
7733        let mut buf = if avail_len < Self::ENCODED_LEN {
7734            payload_buf[0..avail_len].copy_from_slice(__input);
7735            Bytes::new(&payload_buf)
7736        } else {
7737            Bytes::new(__input)
7738        };
7739        let mut __struct = Self::default();
7740        __struct.time_utc = buf.get_u64_le()?;
7741        __struct.time_boot_ms = buf.get_u32_le()?;
7742        __struct.lat = buf.get_i32_le()?;
7743        __struct.lon = buf.get_i32_le()?;
7744        __struct.alt = buf.get_i32_le()?;
7745        __struct.relative_alt = buf.get_i32_le()?;
7746        for v in &mut __struct.q {
7747            let val = buf.get_f32_le()?;
7748            *v = val;
7749        }
7750        __struct.image_index = buf.get_i32_le()?;
7751        __struct.camera_id = buf.get_u8()?;
7752        __struct.capture_result = buf.get_i8()?;
7753        let mut tmp = [0_u8; 205usize];
7754        for v in &mut tmp {
7755            *v = buf.get_u8()?;
7756        }
7757        __struct.file_url = CharArray::new(tmp);
7758        Ok(__struct)
7759    }
7760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7761        let mut __tmp = BytesMut::new(bytes);
7762        #[allow(clippy::absurd_extreme_comparisons)]
7763        #[allow(unused_comparisons)]
7764        if __tmp.remaining() < Self::ENCODED_LEN {
7765            panic!(
7766                "buffer is too small (need {} bytes, but got {})",
7767                Self::ENCODED_LEN,
7768                __tmp.remaining(),
7769            )
7770        }
7771        __tmp.put_u64_le(self.time_utc);
7772        __tmp.put_u32_le(self.time_boot_ms);
7773        __tmp.put_i32_le(self.lat);
7774        __tmp.put_i32_le(self.lon);
7775        __tmp.put_i32_le(self.alt);
7776        __tmp.put_i32_le(self.relative_alt);
7777        for val in &self.q {
7778            __tmp.put_f32_le(*val);
7779        }
7780        __tmp.put_i32_le(self.image_index);
7781        __tmp.put_u8(self.camera_id);
7782        __tmp.put_i8(self.capture_result);
7783        for val in &self.file_url {
7784            __tmp.put_u8(*val);
7785        }
7786        if matches!(version, MavlinkVersion::V2) {
7787            let len = __tmp.len();
7788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7789        } else {
7790            __tmp.len()
7791        }
7792    }
7793}
7794#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7795#[doc = ""]
7796#[doc = "ID: 259"]
7797#[derive(Debug, Clone, PartialEq)]
7798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7800#[cfg_attr(feature = "ts", derive(TS))]
7801#[cfg_attr(feature = "ts", ts(export))]
7802pub struct CAMERA_INFORMATION_DATA {
7803    #[doc = "Timestamp (time since system boot)."]
7804    pub time_boot_ms: u32,
7805    #[doc = "0xff). Use 0 if not known."]
7806    pub firmware_version: u32,
7807    #[doc = "Focal length. Use NaN if not known."]
7808    pub focal_length: f32,
7809    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7810    pub sensor_size_h: f32,
7811    #[doc = "Image sensor size vertical. Use NaN if not known."]
7812    pub sensor_size_v: f32,
7813    #[doc = "Bitmap of camera capability flags."]
7814    pub flags: CameraCapFlags,
7815    #[doc = "Horizontal image resolution. Use 0 if not known."]
7816    pub resolution_h: u16,
7817    #[doc = "Vertical image resolution. Use 0 if not known."]
7818    pub resolution_v: u16,
7819    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7820    pub cam_definition_version: u16,
7821    #[doc = "Name of the camera vendor"]
7822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7823    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7824    pub vendor_name: [u8; 32],
7825    #[doc = "Name of the camera model"]
7826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7827    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7828    pub model_name: [u8; 32],
7829    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7830    pub lens_id: u8,
7831    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7832    #[cfg_attr(feature = "ts", ts(type = "string"))]
7833    pub cam_definition_uri: CharArray<140>,
7834    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7836    pub gimbal_device_id: u8,
7837    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7839    pub camera_device_id: u8,
7840}
7841impl CAMERA_INFORMATION_DATA {
7842    pub const ENCODED_LEN: usize = 237usize;
7843    pub const DEFAULT: Self = Self {
7844        time_boot_ms: 0_u32,
7845        firmware_version: 0_u32,
7846        focal_length: 0.0_f32,
7847        sensor_size_h: 0.0_f32,
7848        sensor_size_v: 0.0_f32,
7849        flags: CameraCapFlags::DEFAULT,
7850        resolution_h: 0_u16,
7851        resolution_v: 0_u16,
7852        cam_definition_version: 0_u16,
7853        vendor_name: [0_u8; 32usize],
7854        model_name: [0_u8; 32usize],
7855        lens_id: 0_u8,
7856        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7857        gimbal_device_id: 0_u8,
7858        camera_device_id: 0_u8,
7859    };
7860    #[cfg(feature = "arbitrary")]
7861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7862        use arbitrary::{Arbitrary, Unstructured};
7863        let mut buf = [0u8; 1024];
7864        rng.fill_bytes(&mut buf);
7865        let mut unstructured = Unstructured::new(&buf);
7866        Self::arbitrary(&mut unstructured).unwrap_or_default()
7867    }
7868}
7869impl Default for CAMERA_INFORMATION_DATA {
7870    fn default() -> Self {
7871        Self::DEFAULT.clone()
7872    }
7873}
7874impl MessageData for CAMERA_INFORMATION_DATA {
7875    type Message = MavMessage;
7876    const ID: u32 = 259u32;
7877    const NAME: &'static str = "CAMERA_INFORMATION";
7878    const EXTRA_CRC: u8 = 92u8;
7879    const ENCODED_LEN: usize = 237usize;
7880    fn deser(
7881        _version: MavlinkVersion,
7882        __input: &[u8],
7883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7884        let avail_len = __input.len();
7885        let mut payload_buf = [0; Self::ENCODED_LEN];
7886        let mut buf = if avail_len < Self::ENCODED_LEN {
7887            payload_buf[0..avail_len].copy_from_slice(__input);
7888            Bytes::new(&payload_buf)
7889        } else {
7890            Bytes::new(__input)
7891        };
7892        let mut __struct = Self::default();
7893        __struct.time_boot_ms = buf.get_u32_le()?;
7894        __struct.firmware_version = buf.get_u32_le()?;
7895        __struct.focal_length = buf.get_f32_le()?;
7896        __struct.sensor_size_h = buf.get_f32_le()?;
7897        __struct.sensor_size_v = buf.get_f32_le()?;
7898        let tmp = buf.get_u32_le()?;
7899        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7900            ::mavlink_core::error::ParserError::InvalidFlag {
7901                flag_type: "CameraCapFlags",
7902                value: tmp as u64,
7903            },
7904        )?;
7905        __struct.resolution_h = buf.get_u16_le()?;
7906        __struct.resolution_v = buf.get_u16_le()?;
7907        __struct.cam_definition_version = buf.get_u16_le()?;
7908        for v in &mut __struct.vendor_name {
7909            let val = buf.get_u8()?;
7910            *v = val;
7911        }
7912        for v in &mut __struct.model_name {
7913            let val = buf.get_u8()?;
7914            *v = val;
7915        }
7916        __struct.lens_id = buf.get_u8()?;
7917        let mut tmp = [0_u8; 140usize];
7918        for v in &mut tmp {
7919            *v = buf.get_u8()?;
7920        }
7921        __struct.cam_definition_uri = CharArray::new(tmp);
7922        __struct.gimbal_device_id = buf.get_u8()?;
7923        __struct.camera_device_id = buf.get_u8()?;
7924        Ok(__struct)
7925    }
7926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7927        let mut __tmp = BytesMut::new(bytes);
7928        #[allow(clippy::absurd_extreme_comparisons)]
7929        #[allow(unused_comparisons)]
7930        if __tmp.remaining() < Self::ENCODED_LEN {
7931            panic!(
7932                "buffer is too small (need {} bytes, but got {})",
7933                Self::ENCODED_LEN,
7934                __tmp.remaining(),
7935            )
7936        }
7937        __tmp.put_u32_le(self.time_boot_ms);
7938        __tmp.put_u32_le(self.firmware_version);
7939        __tmp.put_f32_le(self.focal_length);
7940        __tmp.put_f32_le(self.sensor_size_h);
7941        __tmp.put_f32_le(self.sensor_size_v);
7942        __tmp.put_u32_le(self.flags.bits() as u32);
7943        __tmp.put_u16_le(self.resolution_h);
7944        __tmp.put_u16_le(self.resolution_v);
7945        __tmp.put_u16_le(self.cam_definition_version);
7946        for val in &self.vendor_name {
7947            __tmp.put_u8(*val);
7948        }
7949        for val in &self.model_name {
7950            __tmp.put_u8(*val);
7951        }
7952        __tmp.put_u8(self.lens_id);
7953        for val in &self.cam_definition_uri {
7954            __tmp.put_u8(*val);
7955        }
7956        if matches!(version, MavlinkVersion::V2) {
7957            __tmp.put_u8(self.gimbal_device_id);
7958            __tmp.put_u8(self.camera_device_id);
7959            let len = __tmp.len();
7960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7961        } else {
7962            __tmp.len()
7963        }
7964    }
7965}
7966#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7967#[doc = ""]
7968#[doc = "ID: 260"]
7969#[derive(Debug, Clone, PartialEq)]
7970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7972#[cfg_attr(feature = "ts", derive(TS))]
7973#[cfg_attr(feature = "ts", ts(export))]
7974pub struct CAMERA_SETTINGS_DATA {
7975    #[doc = "Timestamp (time since system boot)."]
7976    pub time_boot_ms: u32,
7977    #[doc = "Camera mode"]
7978    pub mode_id: CameraMode,
7979    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7981    pub zoomLevel: f32,
7982    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7983    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7984    pub focusLevel: f32,
7985    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7986    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7987    pub camera_device_id: u8,
7988}
7989impl CAMERA_SETTINGS_DATA {
7990    pub const ENCODED_LEN: usize = 14usize;
7991    pub const DEFAULT: Self = Self {
7992        time_boot_ms: 0_u32,
7993        mode_id: CameraMode::DEFAULT,
7994        zoomLevel: 0.0_f32,
7995        focusLevel: 0.0_f32,
7996        camera_device_id: 0_u8,
7997    };
7998    #[cfg(feature = "arbitrary")]
7999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8000        use arbitrary::{Arbitrary, Unstructured};
8001        let mut buf = [0u8; 1024];
8002        rng.fill_bytes(&mut buf);
8003        let mut unstructured = Unstructured::new(&buf);
8004        Self::arbitrary(&mut unstructured).unwrap_or_default()
8005    }
8006}
8007impl Default for CAMERA_SETTINGS_DATA {
8008    fn default() -> Self {
8009        Self::DEFAULT.clone()
8010    }
8011}
8012impl MessageData for CAMERA_SETTINGS_DATA {
8013    type Message = MavMessage;
8014    const ID: u32 = 260u32;
8015    const NAME: &'static str = "CAMERA_SETTINGS";
8016    const EXTRA_CRC: u8 = 146u8;
8017    const ENCODED_LEN: usize = 14usize;
8018    fn deser(
8019        _version: MavlinkVersion,
8020        __input: &[u8],
8021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8022        let avail_len = __input.len();
8023        let mut payload_buf = [0; Self::ENCODED_LEN];
8024        let mut buf = if avail_len < Self::ENCODED_LEN {
8025            payload_buf[0..avail_len].copy_from_slice(__input);
8026            Bytes::new(&payload_buf)
8027        } else {
8028            Bytes::new(__input)
8029        };
8030        let mut __struct = Self::default();
8031        __struct.time_boot_ms = buf.get_u32_le()?;
8032        let tmp = buf.get_u8()?;
8033        __struct.mode_id =
8034            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8035                enum_type: "CameraMode",
8036                value: tmp as u64,
8037            })?;
8038        __struct.zoomLevel = buf.get_f32_le()?;
8039        __struct.focusLevel = buf.get_f32_le()?;
8040        __struct.camera_device_id = buf.get_u8()?;
8041        Ok(__struct)
8042    }
8043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8044        let mut __tmp = BytesMut::new(bytes);
8045        #[allow(clippy::absurd_extreme_comparisons)]
8046        #[allow(unused_comparisons)]
8047        if __tmp.remaining() < Self::ENCODED_LEN {
8048            panic!(
8049                "buffer is too small (need {} bytes, but got {})",
8050                Self::ENCODED_LEN,
8051                __tmp.remaining(),
8052            )
8053        }
8054        __tmp.put_u32_le(self.time_boot_ms);
8055        __tmp.put_u8(self.mode_id as u8);
8056        if matches!(version, MavlinkVersion::V2) {
8057            __tmp.put_f32_le(self.zoomLevel);
8058            __tmp.put_f32_le(self.focusLevel);
8059            __tmp.put_u8(self.camera_device_id);
8060            let len = __tmp.len();
8061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8062        } else {
8063            __tmp.len()
8064        }
8065    }
8066}
8067#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8068#[doc = ""]
8069#[doc = "ID: 277"]
8070#[derive(Debug, Clone, PartialEq)]
8071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8073#[cfg_attr(feature = "ts", derive(TS))]
8074#[cfg_attr(feature = "ts", ts(export))]
8075pub struct CAMERA_THERMAL_RANGE_DATA {
8076    #[doc = "Timestamp (time since system boot)."]
8077    pub time_boot_ms: u32,
8078    #[doc = "Temperature max."]
8079    pub max: f32,
8080    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8081    pub max_point_x: f32,
8082    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8083    pub max_point_y: f32,
8084    #[doc = "Temperature min."]
8085    pub min: f32,
8086    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8087    pub min_point_x: f32,
8088    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8089    pub min_point_y: f32,
8090    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8091    pub stream_id: u8,
8092    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8093    pub camera_device_id: u8,
8094}
8095impl CAMERA_THERMAL_RANGE_DATA {
8096    pub const ENCODED_LEN: usize = 30usize;
8097    pub const DEFAULT: Self = Self {
8098        time_boot_ms: 0_u32,
8099        max: 0.0_f32,
8100        max_point_x: 0.0_f32,
8101        max_point_y: 0.0_f32,
8102        min: 0.0_f32,
8103        min_point_x: 0.0_f32,
8104        min_point_y: 0.0_f32,
8105        stream_id: 0_u8,
8106        camera_device_id: 0_u8,
8107    };
8108    #[cfg(feature = "arbitrary")]
8109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8110        use arbitrary::{Arbitrary, Unstructured};
8111        let mut buf = [0u8; 1024];
8112        rng.fill_bytes(&mut buf);
8113        let mut unstructured = Unstructured::new(&buf);
8114        Self::arbitrary(&mut unstructured).unwrap_or_default()
8115    }
8116}
8117impl Default for CAMERA_THERMAL_RANGE_DATA {
8118    fn default() -> Self {
8119        Self::DEFAULT.clone()
8120    }
8121}
8122impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8123    type Message = MavMessage;
8124    const ID: u32 = 277u32;
8125    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8126    const EXTRA_CRC: u8 = 62u8;
8127    const ENCODED_LEN: usize = 30usize;
8128    fn deser(
8129        _version: MavlinkVersion,
8130        __input: &[u8],
8131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8132        let avail_len = __input.len();
8133        let mut payload_buf = [0; Self::ENCODED_LEN];
8134        let mut buf = if avail_len < Self::ENCODED_LEN {
8135            payload_buf[0..avail_len].copy_from_slice(__input);
8136            Bytes::new(&payload_buf)
8137        } else {
8138            Bytes::new(__input)
8139        };
8140        let mut __struct = Self::default();
8141        __struct.time_boot_ms = buf.get_u32_le()?;
8142        __struct.max = buf.get_f32_le()?;
8143        __struct.max_point_x = buf.get_f32_le()?;
8144        __struct.max_point_y = buf.get_f32_le()?;
8145        __struct.min = buf.get_f32_le()?;
8146        __struct.min_point_x = buf.get_f32_le()?;
8147        __struct.min_point_y = buf.get_f32_le()?;
8148        __struct.stream_id = buf.get_u8()?;
8149        __struct.camera_device_id = buf.get_u8()?;
8150        Ok(__struct)
8151    }
8152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8153        let mut __tmp = BytesMut::new(bytes);
8154        #[allow(clippy::absurd_extreme_comparisons)]
8155        #[allow(unused_comparisons)]
8156        if __tmp.remaining() < Self::ENCODED_LEN {
8157            panic!(
8158                "buffer is too small (need {} bytes, but got {})",
8159                Self::ENCODED_LEN,
8160                __tmp.remaining(),
8161            )
8162        }
8163        __tmp.put_u32_le(self.time_boot_ms);
8164        __tmp.put_f32_le(self.max);
8165        __tmp.put_f32_le(self.max_point_x);
8166        __tmp.put_f32_le(self.max_point_y);
8167        __tmp.put_f32_le(self.min);
8168        __tmp.put_f32_le(self.min_point_x);
8169        __tmp.put_f32_le(self.min_point_y);
8170        __tmp.put_u8(self.stream_id);
8171        __tmp.put_u8(self.camera_device_id);
8172        if matches!(version, MavlinkVersion::V2) {
8173            let len = __tmp.len();
8174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8175        } else {
8176            __tmp.len()
8177        }
8178    }
8179}
8180#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8181#[doc = ""]
8182#[doc = "ID: 276"]
8183#[derive(Debug, Clone, PartialEq)]
8184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8186#[cfg_attr(feature = "ts", derive(TS))]
8187#[cfg_attr(feature = "ts", ts(export))]
8188pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8189    #[doc = "Latitude of tracked object"]
8190    pub lat: i32,
8191    #[doc = "Longitude of tracked object"]
8192    pub lon: i32,
8193    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8194    pub alt: f32,
8195    #[doc = "Horizontal accuracy. NAN if unknown"]
8196    pub h_acc: f32,
8197    #[doc = "Vertical accuracy. NAN if unknown"]
8198    pub v_acc: f32,
8199    #[doc = "North velocity of tracked object. NAN if unknown"]
8200    pub vel_n: f32,
8201    #[doc = "East velocity of tracked object. NAN if unknown"]
8202    pub vel_e: f32,
8203    #[doc = "Down velocity of tracked object. NAN if unknown"]
8204    pub vel_d: f32,
8205    #[doc = "Velocity accuracy. NAN if unknown"]
8206    pub vel_acc: f32,
8207    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8208    pub dist: f32,
8209    #[doc = "Heading in radians, in NED. NAN if unknown"]
8210    pub hdg: f32,
8211    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8212    pub hdg_acc: f32,
8213    #[doc = "Current tracking status"]
8214    pub tracking_status: CameraTrackingStatusFlags,
8215    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8217    pub camera_device_id: u8,
8218}
8219impl CAMERA_TRACKING_GEO_STATUS_DATA {
8220    pub const ENCODED_LEN: usize = 50usize;
8221    pub const DEFAULT: Self = Self {
8222        lat: 0_i32,
8223        lon: 0_i32,
8224        alt: 0.0_f32,
8225        h_acc: 0.0_f32,
8226        v_acc: 0.0_f32,
8227        vel_n: 0.0_f32,
8228        vel_e: 0.0_f32,
8229        vel_d: 0.0_f32,
8230        vel_acc: 0.0_f32,
8231        dist: 0.0_f32,
8232        hdg: 0.0_f32,
8233        hdg_acc: 0.0_f32,
8234        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8235        camera_device_id: 0_u8,
8236    };
8237    #[cfg(feature = "arbitrary")]
8238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8239        use arbitrary::{Arbitrary, Unstructured};
8240        let mut buf = [0u8; 1024];
8241        rng.fill_bytes(&mut buf);
8242        let mut unstructured = Unstructured::new(&buf);
8243        Self::arbitrary(&mut unstructured).unwrap_or_default()
8244    }
8245}
8246impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8247    fn default() -> Self {
8248        Self::DEFAULT.clone()
8249    }
8250}
8251impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8252    type Message = MavMessage;
8253    const ID: u32 = 276u32;
8254    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8255    const EXTRA_CRC: u8 = 18u8;
8256    const ENCODED_LEN: usize = 50usize;
8257    fn deser(
8258        _version: MavlinkVersion,
8259        __input: &[u8],
8260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8261        let avail_len = __input.len();
8262        let mut payload_buf = [0; Self::ENCODED_LEN];
8263        let mut buf = if avail_len < Self::ENCODED_LEN {
8264            payload_buf[0..avail_len].copy_from_slice(__input);
8265            Bytes::new(&payload_buf)
8266        } else {
8267            Bytes::new(__input)
8268        };
8269        let mut __struct = Self::default();
8270        __struct.lat = buf.get_i32_le()?;
8271        __struct.lon = buf.get_i32_le()?;
8272        __struct.alt = buf.get_f32_le()?;
8273        __struct.h_acc = buf.get_f32_le()?;
8274        __struct.v_acc = buf.get_f32_le()?;
8275        __struct.vel_n = buf.get_f32_le()?;
8276        __struct.vel_e = buf.get_f32_le()?;
8277        __struct.vel_d = buf.get_f32_le()?;
8278        __struct.vel_acc = buf.get_f32_le()?;
8279        __struct.dist = buf.get_f32_le()?;
8280        __struct.hdg = buf.get_f32_le()?;
8281        __struct.hdg_acc = buf.get_f32_le()?;
8282        let tmp = buf.get_u8()?;
8283        __struct.tracking_status =
8284            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8285                enum_type: "CameraTrackingStatusFlags",
8286                value: tmp as u64,
8287            })?;
8288        __struct.camera_device_id = buf.get_u8()?;
8289        Ok(__struct)
8290    }
8291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8292        let mut __tmp = BytesMut::new(bytes);
8293        #[allow(clippy::absurd_extreme_comparisons)]
8294        #[allow(unused_comparisons)]
8295        if __tmp.remaining() < Self::ENCODED_LEN {
8296            panic!(
8297                "buffer is too small (need {} bytes, but got {})",
8298                Self::ENCODED_LEN,
8299                __tmp.remaining(),
8300            )
8301        }
8302        __tmp.put_i32_le(self.lat);
8303        __tmp.put_i32_le(self.lon);
8304        __tmp.put_f32_le(self.alt);
8305        __tmp.put_f32_le(self.h_acc);
8306        __tmp.put_f32_le(self.v_acc);
8307        __tmp.put_f32_le(self.vel_n);
8308        __tmp.put_f32_le(self.vel_e);
8309        __tmp.put_f32_le(self.vel_d);
8310        __tmp.put_f32_le(self.vel_acc);
8311        __tmp.put_f32_le(self.dist);
8312        __tmp.put_f32_le(self.hdg);
8313        __tmp.put_f32_le(self.hdg_acc);
8314        __tmp.put_u8(self.tracking_status as u8);
8315        if matches!(version, MavlinkVersion::V2) {
8316            __tmp.put_u8(self.camera_device_id);
8317            let len = __tmp.len();
8318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8319        } else {
8320            __tmp.len()
8321        }
8322    }
8323}
8324#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8325#[doc = ""]
8326#[doc = "ID: 275"]
8327#[derive(Debug, Clone, PartialEq)]
8328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8330#[cfg_attr(feature = "ts", derive(TS))]
8331#[cfg_attr(feature = "ts", ts(export))]
8332pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8333    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8334    pub point_x: f32,
8335    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8336    pub point_y: f32,
8337    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8338    pub radius: f32,
8339    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8340    pub rec_top_x: f32,
8341    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8342    pub rec_top_y: f32,
8343    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8344    pub rec_bottom_x: f32,
8345    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8346    pub rec_bottom_y: f32,
8347    #[doc = "Current tracking status"]
8348    pub tracking_status: CameraTrackingStatusFlags,
8349    #[doc = "Current tracking mode"]
8350    pub tracking_mode: CameraTrackingMode,
8351    #[doc = "Defines location of target data"]
8352    pub target_data: CameraTrackingTargetData,
8353    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8354    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8355    pub camera_device_id: u8,
8356}
8357impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8358    pub const ENCODED_LEN: usize = 32usize;
8359    pub const DEFAULT: Self = Self {
8360        point_x: 0.0_f32,
8361        point_y: 0.0_f32,
8362        radius: 0.0_f32,
8363        rec_top_x: 0.0_f32,
8364        rec_top_y: 0.0_f32,
8365        rec_bottom_x: 0.0_f32,
8366        rec_bottom_y: 0.0_f32,
8367        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8368        tracking_mode: CameraTrackingMode::DEFAULT,
8369        target_data: CameraTrackingTargetData::DEFAULT,
8370        camera_device_id: 0_u8,
8371    };
8372    #[cfg(feature = "arbitrary")]
8373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8374        use arbitrary::{Arbitrary, Unstructured};
8375        let mut buf = [0u8; 1024];
8376        rng.fill_bytes(&mut buf);
8377        let mut unstructured = Unstructured::new(&buf);
8378        Self::arbitrary(&mut unstructured).unwrap_or_default()
8379    }
8380}
8381impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8382    fn default() -> Self {
8383        Self::DEFAULT.clone()
8384    }
8385}
8386impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8387    type Message = MavMessage;
8388    const ID: u32 = 275u32;
8389    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8390    const EXTRA_CRC: u8 = 126u8;
8391    const ENCODED_LEN: usize = 32usize;
8392    fn deser(
8393        _version: MavlinkVersion,
8394        __input: &[u8],
8395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8396        let avail_len = __input.len();
8397        let mut payload_buf = [0; Self::ENCODED_LEN];
8398        let mut buf = if avail_len < Self::ENCODED_LEN {
8399            payload_buf[0..avail_len].copy_from_slice(__input);
8400            Bytes::new(&payload_buf)
8401        } else {
8402            Bytes::new(__input)
8403        };
8404        let mut __struct = Self::default();
8405        __struct.point_x = buf.get_f32_le()?;
8406        __struct.point_y = buf.get_f32_le()?;
8407        __struct.radius = buf.get_f32_le()?;
8408        __struct.rec_top_x = buf.get_f32_le()?;
8409        __struct.rec_top_y = buf.get_f32_le()?;
8410        __struct.rec_bottom_x = buf.get_f32_le()?;
8411        __struct.rec_bottom_y = buf.get_f32_le()?;
8412        let tmp = buf.get_u8()?;
8413        __struct.tracking_status =
8414            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8415                enum_type: "CameraTrackingStatusFlags",
8416                value: tmp as u64,
8417            })?;
8418        let tmp = buf.get_u8()?;
8419        __struct.tracking_mode =
8420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8421                enum_type: "CameraTrackingMode",
8422                value: tmp as u64,
8423            })?;
8424        let tmp = buf.get_u8()?;
8425        __struct.target_data =
8426            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
8427                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8428                flag_type: "CameraTrackingTargetData",
8429                value: tmp as u64,
8430            })?;
8431        __struct.camera_device_id = buf.get_u8()?;
8432        Ok(__struct)
8433    }
8434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8435        let mut __tmp = BytesMut::new(bytes);
8436        #[allow(clippy::absurd_extreme_comparisons)]
8437        #[allow(unused_comparisons)]
8438        if __tmp.remaining() < Self::ENCODED_LEN {
8439            panic!(
8440                "buffer is too small (need {} bytes, but got {})",
8441                Self::ENCODED_LEN,
8442                __tmp.remaining(),
8443            )
8444        }
8445        __tmp.put_f32_le(self.point_x);
8446        __tmp.put_f32_le(self.point_y);
8447        __tmp.put_f32_le(self.radius);
8448        __tmp.put_f32_le(self.rec_top_x);
8449        __tmp.put_f32_le(self.rec_top_y);
8450        __tmp.put_f32_le(self.rec_bottom_x);
8451        __tmp.put_f32_le(self.rec_bottom_y);
8452        __tmp.put_u8(self.tracking_status as u8);
8453        __tmp.put_u8(self.tracking_mode as u8);
8454        __tmp.put_u8(self.target_data.bits() as u8);
8455        if matches!(version, MavlinkVersion::V2) {
8456            __tmp.put_u8(self.camera_device_id);
8457            let len = __tmp.len();
8458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8459        } else {
8460            __tmp.len()
8461        }
8462    }
8463}
8464#[doc = "Camera-IMU triggering and synchronisation message."]
8465#[doc = ""]
8466#[doc = "ID: 112"]
8467#[derive(Debug, Clone, PartialEq)]
8468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8470#[cfg_attr(feature = "ts", derive(TS))]
8471#[cfg_attr(feature = "ts", ts(export))]
8472pub struct CAMERA_TRIGGER_DATA {
8473    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8474    pub time_usec: u64,
8475    #[doc = "Image frame sequence"]
8476    pub seq: u32,
8477}
8478impl CAMERA_TRIGGER_DATA {
8479    pub const ENCODED_LEN: usize = 12usize;
8480    pub const DEFAULT: Self = Self {
8481        time_usec: 0_u64,
8482        seq: 0_u32,
8483    };
8484    #[cfg(feature = "arbitrary")]
8485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8486        use arbitrary::{Arbitrary, Unstructured};
8487        let mut buf = [0u8; 1024];
8488        rng.fill_bytes(&mut buf);
8489        let mut unstructured = Unstructured::new(&buf);
8490        Self::arbitrary(&mut unstructured).unwrap_or_default()
8491    }
8492}
8493impl Default for CAMERA_TRIGGER_DATA {
8494    fn default() -> Self {
8495        Self::DEFAULT.clone()
8496    }
8497}
8498impl MessageData for CAMERA_TRIGGER_DATA {
8499    type Message = MavMessage;
8500    const ID: u32 = 112u32;
8501    const NAME: &'static str = "CAMERA_TRIGGER";
8502    const EXTRA_CRC: u8 = 174u8;
8503    const ENCODED_LEN: usize = 12usize;
8504    fn deser(
8505        _version: MavlinkVersion,
8506        __input: &[u8],
8507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8508        let avail_len = __input.len();
8509        let mut payload_buf = [0; Self::ENCODED_LEN];
8510        let mut buf = if avail_len < Self::ENCODED_LEN {
8511            payload_buf[0..avail_len].copy_from_slice(__input);
8512            Bytes::new(&payload_buf)
8513        } else {
8514            Bytes::new(__input)
8515        };
8516        let mut __struct = Self::default();
8517        __struct.time_usec = buf.get_u64_le()?;
8518        __struct.seq = buf.get_u32_le()?;
8519        Ok(__struct)
8520    }
8521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8522        let mut __tmp = BytesMut::new(bytes);
8523        #[allow(clippy::absurd_extreme_comparisons)]
8524        #[allow(unused_comparisons)]
8525        if __tmp.remaining() < Self::ENCODED_LEN {
8526            panic!(
8527                "buffer is too small (need {} bytes, but got {})",
8528                Self::ENCODED_LEN,
8529                __tmp.remaining(),
8530            )
8531        }
8532        __tmp.put_u64_le(self.time_usec);
8533        __tmp.put_u32_le(self.seq);
8534        if matches!(version, MavlinkVersion::V2) {
8535            let len = __tmp.len();
8536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8537        } else {
8538            __tmp.len()
8539        }
8540    }
8541}
8542#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8543#[doc = ""]
8544#[doc = "ID: 387"]
8545#[derive(Debug, Clone, PartialEq)]
8546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8548#[cfg_attr(feature = "ts", derive(TS))]
8549#[cfg_attr(feature = "ts", ts(export))]
8550pub struct CANFD_FRAME_DATA {
8551    #[doc = "Frame ID"]
8552    pub id: u32,
8553    #[doc = "System ID."]
8554    pub target_system: u8,
8555    #[doc = "Component ID."]
8556    pub target_component: u8,
8557    #[doc = "bus number"]
8558    pub bus: u8,
8559    #[doc = "Frame length"]
8560    pub len: u8,
8561    #[doc = "Frame data"]
8562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8563    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8564    pub data: [u8; 64],
8565}
8566impl CANFD_FRAME_DATA {
8567    pub const ENCODED_LEN: usize = 72usize;
8568    pub const DEFAULT: Self = Self {
8569        id: 0_u32,
8570        target_system: 0_u8,
8571        target_component: 0_u8,
8572        bus: 0_u8,
8573        len: 0_u8,
8574        data: [0_u8; 64usize],
8575    };
8576    #[cfg(feature = "arbitrary")]
8577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8578        use arbitrary::{Arbitrary, Unstructured};
8579        let mut buf = [0u8; 1024];
8580        rng.fill_bytes(&mut buf);
8581        let mut unstructured = Unstructured::new(&buf);
8582        Self::arbitrary(&mut unstructured).unwrap_or_default()
8583    }
8584}
8585impl Default for CANFD_FRAME_DATA {
8586    fn default() -> Self {
8587        Self::DEFAULT.clone()
8588    }
8589}
8590impl MessageData for CANFD_FRAME_DATA {
8591    type Message = MavMessage;
8592    const ID: u32 = 387u32;
8593    const NAME: &'static str = "CANFD_FRAME";
8594    const EXTRA_CRC: u8 = 4u8;
8595    const ENCODED_LEN: usize = 72usize;
8596    fn deser(
8597        _version: MavlinkVersion,
8598        __input: &[u8],
8599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8600        let avail_len = __input.len();
8601        let mut payload_buf = [0; Self::ENCODED_LEN];
8602        let mut buf = if avail_len < Self::ENCODED_LEN {
8603            payload_buf[0..avail_len].copy_from_slice(__input);
8604            Bytes::new(&payload_buf)
8605        } else {
8606            Bytes::new(__input)
8607        };
8608        let mut __struct = Self::default();
8609        __struct.id = buf.get_u32_le()?;
8610        __struct.target_system = buf.get_u8()?;
8611        __struct.target_component = buf.get_u8()?;
8612        __struct.bus = buf.get_u8()?;
8613        __struct.len = buf.get_u8()?;
8614        for v in &mut __struct.data {
8615            let val = buf.get_u8()?;
8616            *v = val;
8617        }
8618        Ok(__struct)
8619    }
8620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8621        let mut __tmp = BytesMut::new(bytes);
8622        #[allow(clippy::absurd_extreme_comparisons)]
8623        #[allow(unused_comparisons)]
8624        if __tmp.remaining() < Self::ENCODED_LEN {
8625            panic!(
8626                "buffer is too small (need {} bytes, but got {})",
8627                Self::ENCODED_LEN,
8628                __tmp.remaining(),
8629            )
8630        }
8631        __tmp.put_u32_le(self.id);
8632        __tmp.put_u8(self.target_system);
8633        __tmp.put_u8(self.target_component);
8634        __tmp.put_u8(self.bus);
8635        __tmp.put_u8(self.len);
8636        for val in &self.data {
8637            __tmp.put_u8(*val);
8638        }
8639        if matches!(version, MavlinkVersion::V2) {
8640            let len = __tmp.len();
8641            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8642        } else {
8643            __tmp.len()
8644        }
8645    }
8646}
8647#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8648#[doc = ""]
8649#[doc = "ID: 388"]
8650#[derive(Debug, Clone, PartialEq)]
8651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8652#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8653#[cfg_attr(feature = "ts", derive(TS))]
8654#[cfg_attr(feature = "ts", ts(export))]
8655pub struct CAN_FILTER_MODIFY_DATA {
8656    #[doc = "filter IDs, length num_ids"]
8657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8658    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8659    pub ids: [u16; 16],
8660    #[doc = "System ID."]
8661    pub target_system: u8,
8662    #[doc = "Component ID."]
8663    pub target_component: u8,
8664    #[doc = "bus number"]
8665    pub bus: u8,
8666    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8667    pub operation: CanFilterOp,
8668    #[doc = "number of IDs in filter list"]
8669    pub num_ids: u8,
8670}
8671impl CAN_FILTER_MODIFY_DATA {
8672    pub const ENCODED_LEN: usize = 37usize;
8673    pub const DEFAULT: Self = Self {
8674        ids: [0_u16; 16usize],
8675        target_system: 0_u8,
8676        target_component: 0_u8,
8677        bus: 0_u8,
8678        operation: CanFilterOp::DEFAULT,
8679        num_ids: 0_u8,
8680    };
8681    #[cfg(feature = "arbitrary")]
8682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8683        use arbitrary::{Arbitrary, Unstructured};
8684        let mut buf = [0u8; 1024];
8685        rng.fill_bytes(&mut buf);
8686        let mut unstructured = Unstructured::new(&buf);
8687        Self::arbitrary(&mut unstructured).unwrap_or_default()
8688    }
8689}
8690impl Default for CAN_FILTER_MODIFY_DATA {
8691    fn default() -> Self {
8692        Self::DEFAULT.clone()
8693    }
8694}
8695impl MessageData for CAN_FILTER_MODIFY_DATA {
8696    type Message = MavMessage;
8697    const ID: u32 = 388u32;
8698    const NAME: &'static str = "CAN_FILTER_MODIFY";
8699    const EXTRA_CRC: u8 = 8u8;
8700    const ENCODED_LEN: usize = 37usize;
8701    fn deser(
8702        _version: MavlinkVersion,
8703        __input: &[u8],
8704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8705        let avail_len = __input.len();
8706        let mut payload_buf = [0; Self::ENCODED_LEN];
8707        let mut buf = if avail_len < Self::ENCODED_LEN {
8708            payload_buf[0..avail_len].copy_from_slice(__input);
8709            Bytes::new(&payload_buf)
8710        } else {
8711            Bytes::new(__input)
8712        };
8713        let mut __struct = Self::default();
8714        for v in &mut __struct.ids {
8715            let val = buf.get_u16_le()?;
8716            *v = val;
8717        }
8718        __struct.target_system = buf.get_u8()?;
8719        __struct.target_component = buf.get_u8()?;
8720        __struct.bus = buf.get_u8()?;
8721        let tmp = buf.get_u8()?;
8722        __struct.operation =
8723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8724                enum_type: "CanFilterOp",
8725                value: tmp as u64,
8726            })?;
8727        __struct.num_ids = buf.get_u8()?;
8728        Ok(__struct)
8729    }
8730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8731        let mut __tmp = BytesMut::new(bytes);
8732        #[allow(clippy::absurd_extreme_comparisons)]
8733        #[allow(unused_comparisons)]
8734        if __tmp.remaining() < Self::ENCODED_LEN {
8735            panic!(
8736                "buffer is too small (need {} bytes, but got {})",
8737                Self::ENCODED_LEN,
8738                __tmp.remaining(),
8739            )
8740        }
8741        for val in &self.ids {
8742            __tmp.put_u16_le(*val);
8743        }
8744        __tmp.put_u8(self.target_system);
8745        __tmp.put_u8(self.target_component);
8746        __tmp.put_u8(self.bus);
8747        __tmp.put_u8(self.operation as u8);
8748        __tmp.put_u8(self.num_ids);
8749        if matches!(version, MavlinkVersion::V2) {
8750            let len = __tmp.len();
8751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8752        } else {
8753            __tmp.len()
8754        }
8755    }
8756}
8757#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8758#[doc = ""]
8759#[doc = "ID: 386"]
8760#[derive(Debug, Clone, PartialEq)]
8761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8763#[cfg_attr(feature = "ts", derive(TS))]
8764#[cfg_attr(feature = "ts", ts(export))]
8765pub struct CAN_FRAME_DATA {
8766    #[doc = "Frame ID"]
8767    pub id: u32,
8768    #[doc = "System ID."]
8769    pub target_system: u8,
8770    #[doc = "Component ID."]
8771    pub target_component: u8,
8772    #[doc = "Bus number"]
8773    pub bus: u8,
8774    #[doc = "Frame length"]
8775    pub len: u8,
8776    #[doc = "Frame data"]
8777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8779    pub data: [u8; 8],
8780}
8781impl CAN_FRAME_DATA {
8782    pub const ENCODED_LEN: usize = 16usize;
8783    pub const DEFAULT: Self = Self {
8784        id: 0_u32,
8785        target_system: 0_u8,
8786        target_component: 0_u8,
8787        bus: 0_u8,
8788        len: 0_u8,
8789        data: [0_u8; 8usize],
8790    };
8791    #[cfg(feature = "arbitrary")]
8792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8793        use arbitrary::{Arbitrary, Unstructured};
8794        let mut buf = [0u8; 1024];
8795        rng.fill_bytes(&mut buf);
8796        let mut unstructured = Unstructured::new(&buf);
8797        Self::arbitrary(&mut unstructured).unwrap_or_default()
8798    }
8799}
8800impl Default for CAN_FRAME_DATA {
8801    fn default() -> Self {
8802        Self::DEFAULT.clone()
8803    }
8804}
8805impl MessageData for CAN_FRAME_DATA {
8806    type Message = MavMessage;
8807    const ID: u32 = 386u32;
8808    const NAME: &'static str = "CAN_FRAME";
8809    const EXTRA_CRC: u8 = 132u8;
8810    const ENCODED_LEN: usize = 16usize;
8811    fn deser(
8812        _version: MavlinkVersion,
8813        __input: &[u8],
8814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8815        let avail_len = __input.len();
8816        let mut payload_buf = [0; Self::ENCODED_LEN];
8817        let mut buf = if avail_len < Self::ENCODED_LEN {
8818            payload_buf[0..avail_len].copy_from_slice(__input);
8819            Bytes::new(&payload_buf)
8820        } else {
8821            Bytes::new(__input)
8822        };
8823        let mut __struct = Self::default();
8824        __struct.id = buf.get_u32_le()?;
8825        __struct.target_system = buf.get_u8()?;
8826        __struct.target_component = buf.get_u8()?;
8827        __struct.bus = buf.get_u8()?;
8828        __struct.len = buf.get_u8()?;
8829        for v in &mut __struct.data {
8830            let val = buf.get_u8()?;
8831            *v = val;
8832        }
8833        Ok(__struct)
8834    }
8835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8836        let mut __tmp = BytesMut::new(bytes);
8837        #[allow(clippy::absurd_extreme_comparisons)]
8838        #[allow(unused_comparisons)]
8839        if __tmp.remaining() < Self::ENCODED_LEN {
8840            panic!(
8841                "buffer is too small (need {} bytes, but got {})",
8842                Self::ENCODED_LEN,
8843                __tmp.remaining(),
8844            )
8845        }
8846        __tmp.put_u32_le(self.id);
8847        __tmp.put_u8(self.target_system);
8848        __tmp.put_u8(self.target_component);
8849        __tmp.put_u8(self.bus);
8850        __tmp.put_u8(self.len);
8851        for val in &self.data {
8852            __tmp.put_u8(*val);
8853        }
8854        if matches!(version, MavlinkVersion::V2) {
8855            let len = __tmp.len();
8856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8857        } else {
8858            __tmp.len()
8859        }
8860    }
8861}
8862#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8863#[doc = ""]
8864#[doc = "ID: 336"]
8865#[derive(Debug, Clone, PartialEq)]
8866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8868#[cfg_attr(feature = "ts", derive(TS))]
8869#[cfg_attr(feature = "ts", ts(export))]
8870pub struct CELLULAR_CONFIG_DATA {
8871    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8872    pub enable_lte: u8,
8873    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8874    pub enable_pin: u8,
8875    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8876    #[cfg_attr(feature = "ts", ts(type = "string"))]
8877    pub pin: CharArray<16>,
8878    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8879    #[cfg_attr(feature = "ts", ts(type = "string"))]
8880    pub new_pin: CharArray<16>,
8881    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8882    #[cfg_attr(feature = "ts", ts(type = "string"))]
8883    pub apn: CharArray<32>,
8884    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8885    #[cfg_attr(feature = "ts", ts(type = "string"))]
8886    pub puk: CharArray<16>,
8887    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8888    pub roaming: u8,
8889    #[doc = "Message acceptance response (sent back to GS)."]
8890    pub response: CellularConfigResponse,
8891}
8892impl CELLULAR_CONFIG_DATA {
8893    pub const ENCODED_LEN: usize = 84usize;
8894    pub const DEFAULT: Self = Self {
8895        enable_lte: 0_u8,
8896        enable_pin: 0_u8,
8897        pin: CharArray::new([0_u8; 16usize]),
8898        new_pin: CharArray::new([0_u8; 16usize]),
8899        apn: CharArray::new([0_u8; 32usize]),
8900        puk: CharArray::new([0_u8; 16usize]),
8901        roaming: 0_u8,
8902        response: CellularConfigResponse::DEFAULT,
8903    };
8904    #[cfg(feature = "arbitrary")]
8905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8906        use arbitrary::{Arbitrary, Unstructured};
8907        let mut buf = [0u8; 1024];
8908        rng.fill_bytes(&mut buf);
8909        let mut unstructured = Unstructured::new(&buf);
8910        Self::arbitrary(&mut unstructured).unwrap_or_default()
8911    }
8912}
8913impl Default for CELLULAR_CONFIG_DATA {
8914    fn default() -> Self {
8915        Self::DEFAULT.clone()
8916    }
8917}
8918impl MessageData for CELLULAR_CONFIG_DATA {
8919    type Message = MavMessage;
8920    const ID: u32 = 336u32;
8921    const NAME: &'static str = "CELLULAR_CONFIG";
8922    const EXTRA_CRC: u8 = 245u8;
8923    const ENCODED_LEN: usize = 84usize;
8924    fn deser(
8925        _version: MavlinkVersion,
8926        __input: &[u8],
8927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8928        let avail_len = __input.len();
8929        let mut payload_buf = [0; Self::ENCODED_LEN];
8930        let mut buf = if avail_len < Self::ENCODED_LEN {
8931            payload_buf[0..avail_len].copy_from_slice(__input);
8932            Bytes::new(&payload_buf)
8933        } else {
8934            Bytes::new(__input)
8935        };
8936        let mut __struct = Self::default();
8937        __struct.enable_lte = buf.get_u8()?;
8938        __struct.enable_pin = buf.get_u8()?;
8939        let mut tmp = [0_u8; 16usize];
8940        for v in &mut tmp {
8941            *v = buf.get_u8()?;
8942        }
8943        __struct.pin = CharArray::new(tmp);
8944        let mut tmp = [0_u8; 16usize];
8945        for v in &mut tmp {
8946            *v = buf.get_u8()?;
8947        }
8948        __struct.new_pin = CharArray::new(tmp);
8949        let mut tmp = [0_u8; 32usize];
8950        for v in &mut tmp {
8951            *v = buf.get_u8()?;
8952        }
8953        __struct.apn = CharArray::new(tmp);
8954        let mut tmp = [0_u8; 16usize];
8955        for v in &mut tmp {
8956            *v = buf.get_u8()?;
8957        }
8958        __struct.puk = CharArray::new(tmp);
8959        __struct.roaming = buf.get_u8()?;
8960        let tmp = buf.get_u8()?;
8961        __struct.response =
8962            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8963                enum_type: "CellularConfigResponse",
8964                value: tmp as u64,
8965            })?;
8966        Ok(__struct)
8967    }
8968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8969        let mut __tmp = BytesMut::new(bytes);
8970        #[allow(clippy::absurd_extreme_comparisons)]
8971        #[allow(unused_comparisons)]
8972        if __tmp.remaining() < Self::ENCODED_LEN {
8973            panic!(
8974                "buffer is too small (need {} bytes, but got {})",
8975                Self::ENCODED_LEN,
8976                __tmp.remaining(),
8977            )
8978        }
8979        __tmp.put_u8(self.enable_lte);
8980        __tmp.put_u8(self.enable_pin);
8981        for val in &self.pin {
8982            __tmp.put_u8(*val);
8983        }
8984        for val in &self.new_pin {
8985            __tmp.put_u8(*val);
8986        }
8987        for val in &self.apn {
8988            __tmp.put_u8(*val);
8989        }
8990        for val in &self.puk {
8991            __tmp.put_u8(*val);
8992        }
8993        __tmp.put_u8(self.roaming);
8994        __tmp.put_u8(self.response as u8);
8995        if matches!(version, MavlinkVersion::V2) {
8996            let len = __tmp.len();
8997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8998        } else {
8999            __tmp.len()
9000        }
9001    }
9002}
9003#[doc = "Report current used cellular network status."]
9004#[doc = ""]
9005#[doc = "ID: 334"]
9006#[derive(Debug, Clone, PartialEq)]
9007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9009#[cfg_attr(feature = "ts", derive(TS))]
9010#[cfg_attr(feature = "ts", ts(export))]
9011pub struct CELLULAR_STATUS_DATA {
9012    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9013    pub mcc: u16,
9014    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9015    pub mnc: u16,
9016    #[doc = "Location area code. If unknown, set to 0"]
9017    pub lac: u16,
9018    #[doc = "Cellular modem status"]
9019    pub status: CellularStatusFlag,
9020    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9021    pub failure_reason: CellularNetworkFailedReason,
9022    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9023    pub mavtype: CellularNetworkRadioType,
9024    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9025    pub quality: u8,
9026}
9027impl CELLULAR_STATUS_DATA {
9028    pub const ENCODED_LEN: usize = 10usize;
9029    pub const DEFAULT: Self = Self {
9030        mcc: 0_u16,
9031        mnc: 0_u16,
9032        lac: 0_u16,
9033        status: CellularStatusFlag::DEFAULT,
9034        failure_reason: CellularNetworkFailedReason::DEFAULT,
9035        mavtype: CellularNetworkRadioType::DEFAULT,
9036        quality: 0_u8,
9037    };
9038    #[cfg(feature = "arbitrary")]
9039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9040        use arbitrary::{Arbitrary, Unstructured};
9041        let mut buf = [0u8; 1024];
9042        rng.fill_bytes(&mut buf);
9043        let mut unstructured = Unstructured::new(&buf);
9044        Self::arbitrary(&mut unstructured).unwrap_or_default()
9045    }
9046}
9047impl Default for CELLULAR_STATUS_DATA {
9048    fn default() -> Self {
9049        Self::DEFAULT.clone()
9050    }
9051}
9052impl MessageData for CELLULAR_STATUS_DATA {
9053    type Message = MavMessage;
9054    const ID: u32 = 334u32;
9055    const NAME: &'static str = "CELLULAR_STATUS";
9056    const EXTRA_CRC: u8 = 72u8;
9057    const ENCODED_LEN: usize = 10usize;
9058    fn deser(
9059        _version: MavlinkVersion,
9060        __input: &[u8],
9061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9062        let avail_len = __input.len();
9063        let mut payload_buf = [0; Self::ENCODED_LEN];
9064        let mut buf = if avail_len < Self::ENCODED_LEN {
9065            payload_buf[0..avail_len].copy_from_slice(__input);
9066            Bytes::new(&payload_buf)
9067        } else {
9068            Bytes::new(__input)
9069        };
9070        let mut __struct = Self::default();
9071        __struct.mcc = buf.get_u16_le()?;
9072        __struct.mnc = buf.get_u16_le()?;
9073        __struct.lac = buf.get_u16_le()?;
9074        let tmp = buf.get_u8()?;
9075        __struct.status =
9076            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9077                enum_type: "CellularStatusFlag",
9078                value: tmp as u64,
9079            })?;
9080        let tmp = buf.get_u8()?;
9081        __struct.failure_reason =
9082            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9083                enum_type: "CellularNetworkFailedReason",
9084                value: tmp as u64,
9085            })?;
9086        let tmp = buf.get_u8()?;
9087        __struct.mavtype =
9088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9089                enum_type: "CellularNetworkRadioType",
9090                value: tmp as u64,
9091            })?;
9092        __struct.quality = buf.get_u8()?;
9093        Ok(__struct)
9094    }
9095    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9096        let mut __tmp = BytesMut::new(bytes);
9097        #[allow(clippy::absurd_extreme_comparisons)]
9098        #[allow(unused_comparisons)]
9099        if __tmp.remaining() < Self::ENCODED_LEN {
9100            panic!(
9101                "buffer is too small (need {} bytes, but got {})",
9102                Self::ENCODED_LEN,
9103                __tmp.remaining(),
9104            )
9105        }
9106        __tmp.put_u16_le(self.mcc);
9107        __tmp.put_u16_le(self.mnc);
9108        __tmp.put_u16_le(self.lac);
9109        __tmp.put_u8(self.status as u8);
9110        __tmp.put_u8(self.failure_reason as u8);
9111        __tmp.put_u8(self.mavtype as u8);
9112        __tmp.put_u8(self.quality);
9113        if matches!(version, MavlinkVersion::V2) {
9114            let len = __tmp.len();
9115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9116        } else {
9117            __tmp.len()
9118        }
9119    }
9120}
9121#[doc = "Request to control this MAV."]
9122#[doc = ""]
9123#[doc = "ID: 5"]
9124#[derive(Debug, Clone, PartialEq)]
9125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9127#[cfg_attr(feature = "ts", derive(TS))]
9128#[cfg_attr(feature = "ts", ts(export))]
9129pub struct CHANGE_OPERATOR_CONTROL_DATA {
9130    #[doc = "System the GCS requests control for"]
9131    pub target_system: u8,
9132    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9133    pub control_request: u8,
9134    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9135    pub version: u8,
9136    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9137    #[cfg_attr(feature = "ts", ts(type = "string"))]
9138    pub passkey: CharArray<25>,
9139}
9140impl CHANGE_OPERATOR_CONTROL_DATA {
9141    pub const ENCODED_LEN: usize = 28usize;
9142    pub const DEFAULT: Self = Self {
9143        target_system: 0_u8,
9144        control_request: 0_u8,
9145        version: 0_u8,
9146        passkey: CharArray::new([0_u8; 25usize]),
9147    };
9148    #[cfg(feature = "arbitrary")]
9149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9150        use arbitrary::{Arbitrary, Unstructured};
9151        let mut buf = [0u8; 1024];
9152        rng.fill_bytes(&mut buf);
9153        let mut unstructured = Unstructured::new(&buf);
9154        Self::arbitrary(&mut unstructured).unwrap_or_default()
9155    }
9156}
9157impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9158    fn default() -> Self {
9159        Self::DEFAULT.clone()
9160    }
9161}
9162impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9163    type Message = MavMessage;
9164    const ID: u32 = 5u32;
9165    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9166    const EXTRA_CRC: u8 = 217u8;
9167    const ENCODED_LEN: usize = 28usize;
9168    fn deser(
9169        _version: MavlinkVersion,
9170        __input: &[u8],
9171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9172        let avail_len = __input.len();
9173        let mut payload_buf = [0; Self::ENCODED_LEN];
9174        let mut buf = if avail_len < Self::ENCODED_LEN {
9175            payload_buf[0..avail_len].copy_from_slice(__input);
9176            Bytes::new(&payload_buf)
9177        } else {
9178            Bytes::new(__input)
9179        };
9180        let mut __struct = Self::default();
9181        __struct.target_system = buf.get_u8()?;
9182        __struct.control_request = buf.get_u8()?;
9183        __struct.version = buf.get_u8()?;
9184        let mut tmp = [0_u8; 25usize];
9185        for v in &mut tmp {
9186            *v = buf.get_u8()?;
9187        }
9188        __struct.passkey = CharArray::new(tmp);
9189        Ok(__struct)
9190    }
9191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9192        let mut __tmp = BytesMut::new(bytes);
9193        #[allow(clippy::absurd_extreme_comparisons)]
9194        #[allow(unused_comparisons)]
9195        if __tmp.remaining() < Self::ENCODED_LEN {
9196            panic!(
9197                "buffer is too small (need {} bytes, but got {})",
9198                Self::ENCODED_LEN,
9199                __tmp.remaining(),
9200            )
9201        }
9202        __tmp.put_u8(self.target_system);
9203        __tmp.put_u8(self.control_request);
9204        __tmp.put_u8(self.version);
9205        for val in &self.passkey {
9206            __tmp.put_u8(*val);
9207        }
9208        if matches!(version, MavlinkVersion::V2) {
9209            let len = __tmp.len();
9210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9211        } else {
9212            __tmp.len()
9213        }
9214    }
9215}
9216#[doc = "Accept / deny control of this MAV."]
9217#[doc = ""]
9218#[doc = "ID: 6"]
9219#[derive(Debug, Clone, PartialEq)]
9220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9222#[cfg_attr(feature = "ts", derive(TS))]
9223#[cfg_attr(feature = "ts", ts(export))]
9224pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9225    #[doc = "ID of the GCS this message"]
9226    pub gcs_system_id: u8,
9227    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9228    pub control_request: u8,
9229    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9230    pub ack: u8,
9231}
9232impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9233    pub const ENCODED_LEN: usize = 3usize;
9234    pub const DEFAULT: Self = Self {
9235        gcs_system_id: 0_u8,
9236        control_request: 0_u8,
9237        ack: 0_u8,
9238    };
9239    #[cfg(feature = "arbitrary")]
9240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9241        use arbitrary::{Arbitrary, Unstructured};
9242        let mut buf = [0u8; 1024];
9243        rng.fill_bytes(&mut buf);
9244        let mut unstructured = Unstructured::new(&buf);
9245        Self::arbitrary(&mut unstructured).unwrap_or_default()
9246    }
9247}
9248impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9249    fn default() -> Self {
9250        Self::DEFAULT.clone()
9251    }
9252}
9253impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9254    type Message = MavMessage;
9255    const ID: u32 = 6u32;
9256    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9257    const EXTRA_CRC: u8 = 104u8;
9258    const ENCODED_LEN: usize = 3usize;
9259    fn deser(
9260        _version: MavlinkVersion,
9261        __input: &[u8],
9262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9263        let avail_len = __input.len();
9264        let mut payload_buf = [0; Self::ENCODED_LEN];
9265        let mut buf = if avail_len < Self::ENCODED_LEN {
9266            payload_buf[0..avail_len].copy_from_slice(__input);
9267            Bytes::new(&payload_buf)
9268        } else {
9269            Bytes::new(__input)
9270        };
9271        let mut __struct = Self::default();
9272        __struct.gcs_system_id = buf.get_u8()?;
9273        __struct.control_request = buf.get_u8()?;
9274        __struct.ack = buf.get_u8()?;
9275        Ok(__struct)
9276    }
9277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9278        let mut __tmp = BytesMut::new(bytes);
9279        #[allow(clippy::absurd_extreme_comparisons)]
9280        #[allow(unused_comparisons)]
9281        if __tmp.remaining() < Self::ENCODED_LEN {
9282            panic!(
9283                "buffer is too small (need {} bytes, but got {})",
9284                Self::ENCODED_LEN,
9285                __tmp.remaining(),
9286            )
9287        }
9288        __tmp.put_u8(self.gcs_system_id);
9289        __tmp.put_u8(self.control_request);
9290        __tmp.put_u8(self.ack);
9291        if matches!(version, MavlinkVersion::V2) {
9292            let len = __tmp.len();
9293            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9294        } else {
9295            __tmp.len()
9296        }
9297    }
9298}
9299#[doc = "Information about a potential collision."]
9300#[doc = ""]
9301#[doc = "ID: 247"]
9302#[derive(Debug, Clone, PartialEq)]
9303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9305#[cfg_attr(feature = "ts", derive(TS))]
9306#[cfg_attr(feature = "ts", ts(export))]
9307pub struct COLLISION_DATA {
9308    #[doc = "Unique identifier, domain based on src field"]
9309    pub id: u32,
9310    #[doc = "Estimated time until collision occurs"]
9311    pub time_to_minimum_delta: f32,
9312    #[doc = "Closest vertical distance between vehicle and object"]
9313    pub altitude_minimum_delta: f32,
9314    #[doc = "Closest horizontal distance between vehicle and object"]
9315    pub horizontal_minimum_delta: f32,
9316    #[doc = "Collision data source"]
9317    pub src: MavCollisionSrc,
9318    #[doc = "Action that is being taken to avoid this collision"]
9319    pub action: MavCollisionAction,
9320    #[doc = "How concerned the aircraft is about this collision"]
9321    pub threat_level: MavCollisionThreatLevel,
9322}
9323impl COLLISION_DATA {
9324    pub const ENCODED_LEN: usize = 19usize;
9325    pub const DEFAULT: Self = Self {
9326        id: 0_u32,
9327        time_to_minimum_delta: 0.0_f32,
9328        altitude_minimum_delta: 0.0_f32,
9329        horizontal_minimum_delta: 0.0_f32,
9330        src: MavCollisionSrc::DEFAULT,
9331        action: MavCollisionAction::DEFAULT,
9332        threat_level: MavCollisionThreatLevel::DEFAULT,
9333    };
9334    #[cfg(feature = "arbitrary")]
9335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9336        use arbitrary::{Arbitrary, Unstructured};
9337        let mut buf = [0u8; 1024];
9338        rng.fill_bytes(&mut buf);
9339        let mut unstructured = Unstructured::new(&buf);
9340        Self::arbitrary(&mut unstructured).unwrap_or_default()
9341    }
9342}
9343impl Default for COLLISION_DATA {
9344    fn default() -> Self {
9345        Self::DEFAULT.clone()
9346    }
9347}
9348impl MessageData for COLLISION_DATA {
9349    type Message = MavMessage;
9350    const ID: u32 = 247u32;
9351    const NAME: &'static str = "COLLISION";
9352    const EXTRA_CRC: u8 = 81u8;
9353    const ENCODED_LEN: usize = 19usize;
9354    fn deser(
9355        _version: MavlinkVersion,
9356        __input: &[u8],
9357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9358        let avail_len = __input.len();
9359        let mut payload_buf = [0; Self::ENCODED_LEN];
9360        let mut buf = if avail_len < Self::ENCODED_LEN {
9361            payload_buf[0..avail_len].copy_from_slice(__input);
9362            Bytes::new(&payload_buf)
9363        } else {
9364            Bytes::new(__input)
9365        };
9366        let mut __struct = Self::default();
9367        __struct.id = buf.get_u32_le()?;
9368        __struct.time_to_minimum_delta = buf.get_f32_le()?;
9369        __struct.altitude_minimum_delta = buf.get_f32_le()?;
9370        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
9371        let tmp = buf.get_u8()?;
9372        __struct.src =
9373            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9374                enum_type: "MavCollisionSrc",
9375                value: tmp as u64,
9376            })?;
9377        let tmp = buf.get_u8()?;
9378        __struct.action =
9379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9380                enum_type: "MavCollisionAction",
9381                value: tmp as u64,
9382            })?;
9383        let tmp = buf.get_u8()?;
9384        __struct.threat_level =
9385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9386                enum_type: "MavCollisionThreatLevel",
9387                value: tmp as u64,
9388            })?;
9389        Ok(__struct)
9390    }
9391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9392        let mut __tmp = BytesMut::new(bytes);
9393        #[allow(clippy::absurd_extreme_comparisons)]
9394        #[allow(unused_comparisons)]
9395        if __tmp.remaining() < Self::ENCODED_LEN {
9396            panic!(
9397                "buffer is too small (need {} bytes, but got {})",
9398                Self::ENCODED_LEN,
9399                __tmp.remaining(),
9400            )
9401        }
9402        __tmp.put_u32_le(self.id);
9403        __tmp.put_f32_le(self.time_to_minimum_delta);
9404        __tmp.put_f32_le(self.altitude_minimum_delta);
9405        __tmp.put_f32_le(self.horizontal_minimum_delta);
9406        __tmp.put_u8(self.src as u8);
9407        __tmp.put_u8(self.action as u8);
9408        __tmp.put_u8(self.threat_level as u8);
9409        if matches!(version, MavlinkVersion::V2) {
9410            let len = __tmp.len();
9411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9412        } else {
9413            __tmp.len()
9414        }
9415    }
9416}
9417#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9418#[doc = ""]
9419#[doc = "ID: 77"]
9420#[derive(Debug, Clone, PartialEq)]
9421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9423#[cfg_attr(feature = "ts", derive(TS))]
9424#[cfg_attr(feature = "ts", ts(export))]
9425pub struct COMMAND_ACK_DATA {
9426    #[doc = "Command ID (of acknowledged command)."]
9427    pub command: MavCmd,
9428    #[doc = "Result of command."]
9429    pub result: MavResult,
9430    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9432    pub progress: u8,
9433    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9435    pub result_param2: i32,
9436    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9438    pub target_system: u8,
9439    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9440    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9441    pub target_component: u8,
9442}
9443impl COMMAND_ACK_DATA {
9444    pub const ENCODED_LEN: usize = 10usize;
9445    pub const DEFAULT: Self = Self {
9446        command: MavCmd::DEFAULT,
9447        result: MavResult::DEFAULT,
9448        progress: 0_u8,
9449        result_param2: 0_i32,
9450        target_system: 0_u8,
9451        target_component: 0_u8,
9452    };
9453    #[cfg(feature = "arbitrary")]
9454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9455        use arbitrary::{Arbitrary, Unstructured};
9456        let mut buf = [0u8; 1024];
9457        rng.fill_bytes(&mut buf);
9458        let mut unstructured = Unstructured::new(&buf);
9459        Self::arbitrary(&mut unstructured).unwrap_or_default()
9460    }
9461}
9462impl Default for COMMAND_ACK_DATA {
9463    fn default() -> Self {
9464        Self::DEFAULT.clone()
9465    }
9466}
9467impl MessageData for COMMAND_ACK_DATA {
9468    type Message = MavMessage;
9469    const ID: u32 = 77u32;
9470    const NAME: &'static str = "COMMAND_ACK";
9471    const EXTRA_CRC: u8 = 143u8;
9472    const ENCODED_LEN: usize = 10usize;
9473    fn deser(
9474        _version: MavlinkVersion,
9475        __input: &[u8],
9476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9477        let avail_len = __input.len();
9478        let mut payload_buf = [0; Self::ENCODED_LEN];
9479        let mut buf = if avail_len < Self::ENCODED_LEN {
9480            payload_buf[0..avail_len].copy_from_slice(__input);
9481            Bytes::new(&payload_buf)
9482        } else {
9483            Bytes::new(__input)
9484        };
9485        let mut __struct = Self::default();
9486        let tmp = buf.get_u16_le()?;
9487        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9488            ::mavlink_core::error::ParserError::InvalidEnum {
9489                enum_type: "MavCmd",
9490                value: tmp as u64,
9491            },
9492        )?;
9493        let tmp = buf.get_u8()?;
9494        __struct.result =
9495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9496                enum_type: "MavResult",
9497                value: tmp as u64,
9498            })?;
9499        __struct.progress = buf.get_u8()?;
9500        __struct.result_param2 = buf.get_i32_le()?;
9501        __struct.target_system = buf.get_u8()?;
9502        __struct.target_component = buf.get_u8()?;
9503        Ok(__struct)
9504    }
9505    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9506        let mut __tmp = BytesMut::new(bytes);
9507        #[allow(clippy::absurd_extreme_comparisons)]
9508        #[allow(unused_comparisons)]
9509        if __tmp.remaining() < Self::ENCODED_LEN {
9510            panic!(
9511                "buffer is too small (need {} bytes, but got {})",
9512                Self::ENCODED_LEN,
9513                __tmp.remaining(),
9514            )
9515        }
9516        __tmp.put_u16_le(self.command as u16);
9517        __tmp.put_u8(self.result as u8);
9518        if matches!(version, MavlinkVersion::V2) {
9519            __tmp.put_u8(self.progress);
9520            __tmp.put_i32_le(self.result_param2);
9521            __tmp.put_u8(self.target_system);
9522            __tmp.put_u8(self.target_component);
9523            let len = __tmp.len();
9524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9525        } else {
9526            __tmp.len()
9527        }
9528    }
9529}
9530#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9531#[doc = ""]
9532#[doc = "ID: 80"]
9533#[derive(Debug, Clone, PartialEq)]
9534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9536#[cfg_attr(feature = "ts", derive(TS))]
9537#[cfg_attr(feature = "ts", ts(export))]
9538pub struct COMMAND_CANCEL_DATA {
9539    #[doc = "Command ID (of command to cancel)."]
9540    pub command: MavCmd,
9541    #[doc = "System executing long running command. Should not be broadcast (0)."]
9542    pub target_system: u8,
9543    #[doc = "Component executing long running command."]
9544    pub target_component: u8,
9545}
9546impl COMMAND_CANCEL_DATA {
9547    pub const ENCODED_LEN: usize = 4usize;
9548    pub const DEFAULT: Self = Self {
9549        command: MavCmd::DEFAULT,
9550        target_system: 0_u8,
9551        target_component: 0_u8,
9552    };
9553    #[cfg(feature = "arbitrary")]
9554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9555        use arbitrary::{Arbitrary, Unstructured};
9556        let mut buf = [0u8; 1024];
9557        rng.fill_bytes(&mut buf);
9558        let mut unstructured = Unstructured::new(&buf);
9559        Self::arbitrary(&mut unstructured).unwrap_or_default()
9560    }
9561}
9562impl Default for COMMAND_CANCEL_DATA {
9563    fn default() -> Self {
9564        Self::DEFAULT.clone()
9565    }
9566}
9567impl MessageData for COMMAND_CANCEL_DATA {
9568    type Message = MavMessage;
9569    const ID: u32 = 80u32;
9570    const NAME: &'static str = "COMMAND_CANCEL";
9571    const EXTRA_CRC: u8 = 14u8;
9572    const ENCODED_LEN: usize = 4usize;
9573    fn deser(
9574        _version: MavlinkVersion,
9575        __input: &[u8],
9576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9577        let avail_len = __input.len();
9578        let mut payload_buf = [0; Self::ENCODED_LEN];
9579        let mut buf = if avail_len < Self::ENCODED_LEN {
9580            payload_buf[0..avail_len].copy_from_slice(__input);
9581            Bytes::new(&payload_buf)
9582        } else {
9583            Bytes::new(__input)
9584        };
9585        let mut __struct = Self::default();
9586        let tmp = buf.get_u16_le()?;
9587        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9588            ::mavlink_core::error::ParserError::InvalidEnum {
9589                enum_type: "MavCmd",
9590                value: tmp as u64,
9591            },
9592        )?;
9593        __struct.target_system = buf.get_u8()?;
9594        __struct.target_component = buf.get_u8()?;
9595        Ok(__struct)
9596    }
9597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9598        let mut __tmp = BytesMut::new(bytes);
9599        #[allow(clippy::absurd_extreme_comparisons)]
9600        #[allow(unused_comparisons)]
9601        if __tmp.remaining() < Self::ENCODED_LEN {
9602            panic!(
9603                "buffer is too small (need {} bytes, but got {})",
9604                Self::ENCODED_LEN,
9605                __tmp.remaining(),
9606            )
9607        }
9608        __tmp.put_u16_le(self.command as u16);
9609        __tmp.put_u8(self.target_system);
9610        __tmp.put_u8(self.target_component);
9611        if matches!(version, MavlinkVersion::V2) {
9612            let len = __tmp.len();
9613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9614        } else {
9615            __tmp.len()
9616        }
9617    }
9618}
9619#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9620#[doc = ""]
9621#[doc = "ID: 75"]
9622#[derive(Debug, Clone, PartialEq)]
9623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9625#[cfg_attr(feature = "ts", derive(TS))]
9626#[cfg_attr(feature = "ts", ts(export))]
9627pub struct COMMAND_INT_DATA {
9628    #[doc = "PARAM1, see MAV_CMD enum"]
9629    pub param1: f32,
9630    #[doc = "PARAM2, see MAV_CMD enum"]
9631    pub param2: f32,
9632    #[doc = "PARAM3, see MAV_CMD enum"]
9633    pub param3: f32,
9634    #[doc = "PARAM4, see MAV_CMD enum"]
9635    pub param4: f32,
9636    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9637    pub x: i32,
9638    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9639    pub y: i32,
9640    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9641    pub z: f32,
9642    #[doc = "The scheduled action for the mission item."]
9643    pub command: MavCmd,
9644    #[doc = "System ID"]
9645    pub target_system: u8,
9646    #[doc = "Component ID"]
9647    pub target_component: u8,
9648    #[doc = "The coordinate system of the COMMAND."]
9649    pub frame: MavFrame,
9650    #[doc = "Not used."]
9651    pub current: u8,
9652    #[doc = "Not used (set 0)."]
9653    pub autocontinue: u8,
9654}
9655impl COMMAND_INT_DATA {
9656    pub const ENCODED_LEN: usize = 35usize;
9657    pub const DEFAULT: Self = Self {
9658        param1: 0.0_f32,
9659        param2: 0.0_f32,
9660        param3: 0.0_f32,
9661        param4: 0.0_f32,
9662        x: 0_i32,
9663        y: 0_i32,
9664        z: 0.0_f32,
9665        command: MavCmd::DEFAULT,
9666        target_system: 0_u8,
9667        target_component: 0_u8,
9668        frame: MavFrame::DEFAULT,
9669        current: 0_u8,
9670        autocontinue: 0_u8,
9671    };
9672    #[cfg(feature = "arbitrary")]
9673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9674        use arbitrary::{Arbitrary, Unstructured};
9675        let mut buf = [0u8; 1024];
9676        rng.fill_bytes(&mut buf);
9677        let mut unstructured = Unstructured::new(&buf);
9678        Self::arbitrary(&mut unstructured).unwrap_or_default()
9679    }
9680}
9681impl Default for COMMAND_INT_DATA {
9682    fn default() -> Self {
9683        Self::DEFAULT.clone()
9684    }
9685}
9686impl MessageData for COMMAND_INT_DATA {
9687    type Message = MavMessage;
9688    const ID: u32 = 75u32;
9689    const NAME: &'static str = "COMMAND_INT";
9690    const EXTRA_CRC: u8 = 158u8;
9691    const ENCODED_LEN: usize = 35usize;
9692    fn deser(
9693        _version: MavlinkVersion,
9694        __input: &[u8],
9695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9696        let avail_len = __input.len();
9697        let mut payload_buf = [0; Self::ENCODED_LEN];
9698        let mut buf = if avail_len < Self::ENCODED_LEN {
9699            payload_buf[0..avail_len].copy_from_slice(__input);
9700            Bytes::new(&payload_buf)
9701        } else {
9702            Bytes::new(__input)
9703        };
9704        let mut __struct = Self::default();
9705        __struct.param1 = buf.get_f32_le()?;
9706        __struct.param2 = buf.get_f32_le()?;
9707        __struct.param3 = buf.get_f32_le()?;
9708        __struct.param4 = buf.get_f32_le()?;
9709        __struct.x = buf.get_i32_le()?;
9710        __struct.y = buf.get_i32_le()?;
9711        __struct.z = buf.get_f32_le()?;
9712        let tmp = buf.get_u16_le()?;
9713        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9714            ::mavlink_core::error::ParserError::InvalidEnum {
9715                enum_type: "MavCmd",
9716                value: tmp as u64,
9717            },
9718        )?;
9719        __struct.target_system = buf.get_u8()?;
9720        __struct.target_component = buf.get_u8()?;
9721        let tmp = buf.get_u8()?;
9722        __struct.frame =
9723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9724                enum_type: "MavFrame",
9725                value: tmp as u64,
9726            })?;
9727        __struct.current = buf.get_u8()?;
9728        __struct.autocontinue = buf.get_u8()?;
9729        Ok(__struct)
9730    }
9731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9732        let mut __tmp = BytesMut::new(bytes);
9733        #[allow(clippy::absurd_extreme_comparisons)]
9734        #[allow(unused_comparisons)]
9735        if __tmp.remaining() < Self::ENCODED_LEN {
9736            panic!(
9737                "buffer is too small (need {} bytes, but got {})",
9738                Self::ENCODED_LEN,
9739                __tmp.remaining(),
9740            )
9741        }
9742        __tmp.put_f32_le(self.param1);
9743        __tmp.put_f32_le(self.param2);
9744        __tmp.put_f32_le(self.param3);
9745        __tmp.put_f32_le(self.param4);
9746        __tmp.put_i32_le(self.x);
9747        __tmp.put_i32_le(self.y);
9748        __tmp.put_f32_le(self.z);
9749        __tmp.put_u16_le(self.command as u16);
9750        __tmp.put_u8(self.target_system);
9751        __tmp.put_u8(self.target_component);
9752        __tmp.put_u8(self.frame as u8);
9753        __tmp.put_u8(self.current);
9754        __tmp.put_u8(self.autocontinue);
9755        if matches!(version, MavlinkVersion::V2) {
9756            let len = __tmp.len();
9757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9758        } else {
9759            __tmp.len()
9760        }
9761    }
9762}
9763#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9764#[doc = ""]
9765#[doc = "ID: 76"]
9766#[derive(Debug, Clone, PartialEq)]
9767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9769#[cfg_attr(feature = "ts", derive(TS))]
9770#[cfg_attr(feature = "ts", ts(export))]
9771pub struct COMMAND_LONG_DATA {
9772    #[doc = "Parameter 1 (for the specific command)."]
9773    pub param1: f32,
9774    #[doc = "Parameter 2 (for the specific command)."]
9775    pub param2: f32,
9776    #[doc = "Parameter 3 (for the specific command)."]
9777    pub param3: f32,
9778    #[doc = "Parameter 4 (for the specific command)."]
9779    pub param4: f32,
9780    #[doc = "Parameter 5 (for the specific command)."]
9781    pub param5: f32,
9782    #[doc = "Parameter 6 (for the specific command)."]
9783    pub param6: f32,
9784    #[doc = "Parameter 7 (for the specific command)."]
9785    pub param7: f32,
9786    #[doc = "Command ID (of command to send)."]
9787    pub command: MavCmd,
9788    #[doc = "System which should execute the command"]
9789    pub target_system: u8,
9790    #[doc = "Component which should execute the command, 0 for all components"]
9791    pub target_component: u8,
9792    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9793    pub confirmation: u8,
9794}
9795impl COMMAND_LONG_DATA {
9796    pub const ENCODED_LEN: usize = 33usize;
9797    pub const DEFAULT: Self = Self {
9798        param1: 0.0_f32,
9799        param2: 0.0_f32,
9800        param3: 0.0_f32,
9801        param4: 0.0_f32,
9802        param5: 0.0_f32,
9803        param6: 0.0_f32,
9804        param7: 0.0_f32,
9805        command: MavCmd::DEFAULT,
9806        target_system: 0_u8,
9807        target_component: 0_u8,
9808        confirmation: 0_u8,
9809    };
9810    #[cfg(feature = "arbitrary")]
9811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9812        use arbitrary::{Arbitrary, Unstructured};
9813        let mut buf = [0u8; 1024];
9814        rng.fill_bytes(&mut buf);
9815        let mut unstructured = Unstructured::new(&buf);
9816        Self::arbitrary(&mut unstructured).unwrap_or_default()
9817    }
9818}
9819impl Default for COMMAND_LONG_DATA {
9820    fn default() -> Self {
9821        Self::DEFAULT.clone()
9822    }
9823}
9824impl MessageData for COMMAND_LONG_DATA {
9825    type Message = MavMessage;
9826    const ID: u32 = 76u32;
9827    const NAME: &'static str = "COMMAND_LONG";
9828    const EXTRA_CRC: u8 = 152u8;
9829    const ENCODED_LEN: usize = 33usize;
9830    fn deser(
9831        _version: MavlinkVersion,
9832        __input: &[u8],
9833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9834        let avail_len = __input.len();
9835        let mut payload_buf = [0; Self::ENCODED_LEN];
9836        let mut buf = if avail_len < Self::ENCODED_LEN {
9837            payload_buf[0..avail_len].copy_from_slice(__input);
9838            Bytes::new(&payload_buf)
9839        } else {
9840            Bytes::new(__input)
9841        };
9842        let mut __struct = Self::default();
9843        __struct.param1 = buf.get_f32_le()?;
9844        __struct.param2 = buf.get_f32_le()?;
9845        __struct.param3 = buf.get_f32_le()?;
9846        __struct.param4 = buf.get_f32_le()?;
9847        __struct.param5 = buf.get_f32_le()?;
9848        __struct.param6 = buf.get_f32_le()?;
9849        __struct.param7 = buf.get_f32_le()?;
9850        let tmp = buf.get_u16_le()?;
9851        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9852            ::mavlink_core::error::ParserError::InvalidEnum {
9853                enum_type: "MavCmd",
9854                value: tmp as u64,
9855            },
9856        )?;
9857        __struct.target_system = buf.get_u8()?;
9858        __struct.target_component = buf.get_u8()?;
9859        __struct.confirmation = buf.get_u8()?;
9860        Ok(__struct)
9861    }
9862    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9863        let mut __tmp = BytesMut::new(bytes);
9864        #[allow(clippy::absurd_extreme_comparisons)]
9865        #[allow(unused_comparisons)]
9866        if __tmp.remaining() < Self::ENCODED_LEN {
9867            panic!(
9868                "buffer is too small (need {} bytes, but got {})",
9869                Self::ENCODED_LEN,
9870                __tmp.remaining(),
9871            )
9872        }
9873        __tmp.put_f32_le(self.param1);
9874        __tmp.put_f32_le(self.param2);
9875        __tmp.put_f32_le(self.param3);
9876        __tmp.put_f32_le(self.param4);
9877        __tmp.put_f32_le(self.param5);
9878        __tmp.put_f32_le(self.param6);
9879        __tmp.put_f32_le(self.param7);
9880        __tmp.put_u16_le(self.command as u16);
9881        __tmp.put_u8(self.target_system);
9882        __tmp.put_u8(self.target_component);
9883        __tmp.put_u8(self.confirmation);
9884        if matches!(version, MavlinkVersion::V2) {
9885            let len = __tmp.len();
9886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9887        } else {
9888            __tmp.len()
9889        }
9890    }
9891}
9892#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9893#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9894#[doc = ""]
9895#[doc = "ID: 395"]
9896#[derive(Debug, Clone, PartialEq)]
9897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9899#[cfg_attr(feature = "ts", derive(TS))]
9900#[cfg_attr(feature = "ts", ts(export))]
9901pub struct COMPONENT_INFORMATION_DATA {
9902    #[doc = "Timestamp (time since system boot)."]
9903    pub time_boot_ms: u32,
9904    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9905    pub general_metadata_file_crc: u32,
9906    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9907    pub peripherals_metadata_file_crc: u32,
9908    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9909    #[cfg_attr(feature = "ts", ts(type = "string"))]
9910    pub general_metadata_uri: CharArray<100>,
9911    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9912    #[cfg_attr(feature = "ts", ts(type = "string"))]
9913    pub peripherals_metadata_uri: CharArray<100>,
9914}
9915impl COMPONENT_INFORMATION_DATA {
9916    pub const ENCODED_LEN: usize = 212usize;
9917    pub const DEFAULT: Self = Self {
9918        time_boot_ms: 0_u32,
9919        general_metadata_file_crc: 0_u32,
9920        peripherals_metadata_file_crc: 0_u32,
9921        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9922        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9923    };
9924    #[cfg(feature = "arbitrary")]
9925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9926        use arbitrary::{Arbitrary, Unstructured};
9927        let mut buf = [0u8; 1024];
9928        rng.fill_bytes(&mut buf);
9929        let mut unstructured = Unstructured::new(&buf);
9930        Self::arbitrary(&mut unstructured).unwrap_or_default()
9931    }
9932}
9933impl Default for COMPONENT_INFORMATION_DATA {
9934    fn default() -> Self {
9935        Self::DEFAULT.clone()
9936    }
9937}
9938impl MessageData for COMPONENT_INFORMATION_DATA {
9939    type Message = MavMessage;
9940    const ID: u32 = 395u32;
9941    const NAME: &'static str = "COMPONENT_INFORMATION";
9942    const EXTRA_CRC: u8 = 0u8;
9943    const ENCODED_LEN: usize = 212usize;
9944    fn deser(
9945        _version: MavlinkVersion,
9946        __input: &[u8],
9947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9948        let avail_len = __input.len();
9949        let mut payload_buf = [0; Self::ENCODED_LEN];
9950        let mut buf = if avail_len < Self::ENCODED_LEN {
9951            payload_buf[0..avail_len].copy_from_slice(__input);
9952            Bytes::new(&payload_buf)
9953        } else {
9954            Bytes::new(__input)
9955        };
9956        let mut __struct = Self::default();
9957        __struct.time_boot_ms = buf.get_u32_le()?;
9958        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9959        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9960        let mut tmp = [0_u8; 100usize];
9961        for v in &mut tmp {
9962            *v = buf.get_u8()?;
9963        }
9964        __struct.general_metadata_uri = CharArray::new(tmp);
9965        let mut tmp = [0_u8; 100usize];
9966        for v in &mut tmp {
9967            *v = buf.get_u8()?;
9968        }
9969        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9970        Ok(__struct)
9971    }
9972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9973        let mut __tmp = BytesMut::new(bytes);
9974        #[allow(clippy::absurd_extreme_comparisons)]
9975        #[allow(unused_comparisons)]
9976        if __tmp.remaining() < Self::ENCODED_LEN {
9977            panic!(
9978                "buffer is too small (need {} bytes, but got {})",
9979                Self::ENCODED_LEN,
9980                __tmp.remaining(),
9981            )
9982        }
9983        __tmp.put_u32_le(self.time_boot_ms);
9984        __tmp.put_u32_le(self.general_metadata_file_crc);
9985        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9986        for val in &self.general_metadata_uri {
9987            __tmp.put_u8(*val);
9988        }
9989        for val in &self.peripherals_metadata_uri {
9990            __tmp.put_u8(*val);
9991        }
9992        if matches!(version, MavlinkVersion::V2) {
9993            let len = __tmp.len();
9994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9995        } else {
9996            __tmp.len()
9997        }
9998    }
9999}
10000#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10001#[doc = ""]
10002#[doc = "ID: 396"]
10003#[derive(Debug, Clone, PartialEq)]
10004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10006#[cfg_attr(feature = "ts", derive(TS))]
10007#[cfg_attr(feature = "ts", ts(export))]
10008pub struct COMPONENT_INFORMATION_BASIC_DATA {
10009    #[doc = "Component capability flags"]
10010    pub capabilities: MavProtocolCapability,
10011    #[doc = "Timestamp (time since system boot)."]
10012    pub time_boot_ms: u32,
10013    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10014    pub time_manufacture_s: u32,
10015    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10016    #[cfg_attr(feature = "ts", ts(type = "string"))]
10017    pub vendor_name: CharArray<32>,
10018    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10019    #[cfg_attr(feature = "ts", ts(type = "string"))]
10020    pub model_name: CharArray<32>,
10021    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10022    #[cfg_attr(feature = "ts", ts(type = "string"))]
10023    pub software_version: CharArray<24>,
10024    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10025    #[cfg_attr(feature = "ts", ts(type = "string"))]
10026    pub hardware_version: CharArray<24>,
10027    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10028    #[cfg_attr(feature = "ts", ts(type = "string"))]
10029    pub serial_number: CharArray<32>,
10030}
10031impl COMPONENT_INFORMATION_BASIC_DATA {
10032    pub const ENCODED_LEN: usize = 160usize;
10033    pub const DEFAULT: Self = Self {
10034        capabilities: MavProtocolCapability::DEFAULT,
10035        time_boot_ms: 0_u32,
10036        time_manufacture_s: 0_u32,
10037        vendor_name: CharArray::new([0_u8; 32usize]),
10038        model_name: CharArray::new([0_u8; 32usize]),
10039        software_version: CharArray::new([0_u8; 24usize]),
10040        hardware_version: CharArray::new([0_u8; 24usize]),
10041        serial_number: CharArray::new([0_u8; 32usize]),
10042    };
10043    #[cfg(feature = "arbitrary")]
10044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10045        use arbitrary::{Arbitrary, Unstructured};
10046        let mut buf = [0u8; 1024];
10047        rng.fill_bytes(&mut buf);
10048        let mut unstructured = Unstructured::new(&buf);
10049        Self::arbitrary(&mut unstructured).unwrap_or_default()
10050    }
10051}
10052impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10053    fn default() -> Self {
10054        Self::DEFAULT.clone()
10055    }
10056}
10057impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10058    type Message = MavMessage;
10059    const ID: u32 = 396u32;
10060    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10061    const EXTRA_CRC: u8 = 50u8;
10062    const ENCODED_LEN: usize = 160usize;
10063    fn deser(
10064        _version: MavlinkVersion,
10065        __input: &[u8],
10066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10067        let avail_len = __input.len();
10068        let mut payload_buf = [0; Self::ENCODED_LEN];
10069        let mut buf = if avail_len < Self::ENCODED_LEN {
10070            payload_buf[0..avail_len].copy_from_slice(__input);
10071            Bytes::new(&payload_buf)
10072        } else {
10073            Bytes::new(__input)
10074        };
10075        let mut __struct = Self::default();
10076        let tmp = buf.get_u64_le()?;
10077        __struct.capabilities = MavProtocolCapability::from_bits(
10078            tmp as <MavProtocolCapability as Flags>::Bits,
10079        )
10080        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10081            flag_type: "MavProtocolCapability",
10082            value: tmp as u64,
10083        })?;
10084        __struct.time_boot_ms = buf.get_u32_le()?;
10085        __struct.time_manufacture_s = buf.get_u32_le()?;
10086        let mut tmp = [0_u8; 32usize];
10087        for v in &mut tmp {
10088            *v = buf.get_u8()?;
10089        }
10090        __struct.vendor_name = CharArray::new(tmp);
10091        let mut tmp = [0_u8; 32usize];
10092        for v in &mut tmp {
10093            *v = buf.get_u8()?;
10094        }
10095        __struct.model_name = CharArray::new(tmp);
10096        let mut tmp = [0_u8; 24usize];
10097        for v in &mut tmp {
10098            *v = buf.get_u8()?;
10099        }
10100        __struct.software_version = CharArray::new(tmp);
10101        let mut tmp = [0_u8; 24usize];
10102        for v in &mut tmp {
10103            *v = buf.get_u8()?;
10104        }
10105        __struct.hardware_version = CharArray::new(tmp);
10106        let mut tmp = [0_u8; 32usize];
10107        for v in &mut tmp {
10108            *v = buf.get_u8()?;
10109        }
10110        __struct.serial_number = CharArray::new(tmp);
10111        Ok(__struct)
10112    }
10113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10114        let mut __tmp = BytesMut::new(bytes);
10115        #[allow(clippy::absurd_extreme_comparisons)]
10116        #[allow(unused_comparisons)]
10117        if __tmp.remaining() < Self::ENCODED_LEN {
10118            panic!(
10119                "buffer is too small (need {} bytes, but got {})",
10120                Self::ENCODED_LEN,
10121                __tmp.remaining(),
10122            )
10123        }
10124        __tmp.put_u64_le(self.capabilities.bits() as u64);
10125        __tmp.put_u32_le(self.time_boot_ms);
10126        __tmp.put_u32_le(self.time_manufacture_s);
10127        for val in &self.vendor_name {
10128            __tmp.put_u8(*val);
10129        }
10130        for val in &self.model_name {
10131            __tmp.put_u8(*val);
10132        }
10133        for val in &self.software_version {
10134            __tmp.put_u8(*val);
10135        }
10136        for val in &self.hardware_version {
10137            __tmp.put_u8(*val);
10138        }
10139        for val in &self.serial_number {
10140            __tmp.put_u8(*val);
10141        }
10142        if matches!(version, MavlinkVersion::V2) {
10143            let len = __tmp.len();
10144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10145        } else {
10146            __tmp.len()
10147        }
10148    }
10149}
10150#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10151#[doc = ""]
10152#[doc = "ID: 397"]
10153#[derive(Debug, Clone, PartialEq)]
10154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10156#[cfg_attr(feature = "ts", derive(TS))]
10157#[cfg_attr(feature = "ts", ts(export))]
10158pub struct COMPONENT_METADATA_DATA {
10159    #[doc = "Timestamp (time since system boot)."]
10160    pub time_boot_ms: u32,
10161    #[doc = "CRC32 of the general metadata file."]
10162    pub file_crc: u32,
10163    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10164    #[cfg_attr(feature = "ts", ts(type = "string"))]
10165    pub uri: CharArray<100>,
10166}
10167impl COMPONENT_METADATA_DATA {
10168    pub const ENCODED_LEN: usize = 108usize;
10169    pub const DEFAULT: Self = Self {
10170        time_boot_ms: 0_u32,
10171        file_crc: 0_u32,
10172        uri: CharArray::new([0_u8; 100usize]),
10173    };
10174    #[cfg(feature = "arbitrary")]
10175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10176        use arbitrary::{Arbitrary, Unstructured};
10177        let mut buf = [0u8; 1024];
10178        rng.fill_bytes(&mut buf);
10179        let mut unstructured = Unstructured::new(&buf);
10180        Self::arbitrary(&mut unstructured).unwrap_or_default()
10181    }
10182}
10183impl Default for COMPONENT_METADATA_DATA {
10184    fn default() -> Self {
10185        Self::DEFAULT.clone()
10186    }
10187}
10188impl MessageData for COMPONENT_METADATA_DATA {
10189    type Message = MavMessage;
10190    const ID: u32 = 397u32;
10191    const NAME: &'static str = "COMPONENT_METADATA";
10192    const EXTRA_CRC: u8 = 182u8;
10193    const ENCODED_LEN: usize = 108usize;
10194    fn deser(
10195        _version: MavlinkVersion,
10196        __input: &[u8],
10197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10198        let avail_len = __input.len();
10199        let mut payload_buf = [0; Self::ENCODED_LEN];
10200        let mut buf = if avail_len < Self::ENCODED_LEN {
10201            payload_buf[0..avail_len].copy_from_slice(__input);
10202            Bytes::new(&payload_buf)
10203        } else {
10204            Bytes::new(__input)
10205        };
10206        let mut __struct = Self::default();
10207        __struct.time_boot_ms = buf.get_u32_le()?;
10208        __struct.file_crc = buf.get_u32_le()?;
10209        let mut tmp = [0_u8; 100usize];
10210        for v in &mut tmp {
10211            *v = buf.get_u8()?;
10212        }
10213        __struct.uri = CharArray::new(tmp);
10214        Ok(__struct)
10215    }
10216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10217        let mut __tmp = BytesMut::new(bytes);
10218        #[allow(clippy::absurd_extreme_comparisons)]
10219        #[allow(unused_comparisons)]
10220        if __tmp.remaining() < Self::ENCODED_LEN {
10221            panic!(
10222                "buffer is too small (need {} bytes, but got {})",
10223                Self::ENCODED_LEN,
10224                __tmp.remaining(),
10225            )
10226        }
10227        __tmp.put_u32_le(self.time_boot_ms);
10228        __tmp.put_u32_le(self.file_crc);
10229        for val in &self.uri {
10230            __tmp.put_u8(*val);
10231        }
10232        if matches!(version, MavlinkVersion::V2) {
10233            let len = __tmp.len();
10234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10235        } else {
10236            __tmp.len()
10237        }
10238    }
10239}
10240#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10241#[doc = ""]
10242#[doc = "ID: 146"]
10243#[derive(Debug, Clone, PartialEq)]
10244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10246#[cfg_attr(feature = "ts", derive(TS))]
10247#[cfg_attr(feature = "ts", ts(export))]
10248pub struct CONTROL_SYSTEM_STATE_DATA {
10249    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10250    pub time_usec: u64,
10251    #[doc = "X acceleration in body frame"]
10252    pub x_acc: f32,
10253    #[doc = "Y acceleration in body frame"]
10254    pub y_acc: f32,
10255    #[doc = "Z acceleration in body frame"]
10256    pub z_acc: f32,
10257    #[doc = "X velocity in body frame"]
10258    pub x_vel: f32,
10259    #[doc = "Y velocity in body frame"]
10260    pub y_vel: f32,
10261    #[doc = "Z velocity in body frame"]
10262    pub z_vel: f32,
10263    #[doc = "X position in local frame"]
10264    pub x_pos: f32,
10265    #[doc = "Y position in local frame"]
10266    pub y_pos: f32,
10267    #[doc = "Z position in local frame"]
10268    pub z_pos: f32,
10269    #[doc = "Airspeed, set to -1 if unknown"]
10270    pub airspeed: f32,
10271    #[doc = "Variance of body velocity estimate"]
10272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10273    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10274    pub vel_variance: [f32; 3],
10275    #[doc = "Variance in local position"]
10276    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10277    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10278    pub pos_variance: [f32; 3],
10279    #[doc = "The attitude, represented as Quaternion"]
10280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10281    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10282    pub q: [f32; 4],
10283    #[doc = "Angular rate in roll axis"]
10284    pub roll_rate: f32,
10285    #[doc = "Angular rate in pitch axis"]
10286    pub pitch_rate: f32,
10287    #[doc = "Angular rate in yaw axis"]
10288    pub yaw_rate: f32,
10289}
10290impl CONTROL_SYSTEM_STATE_DATA {
10291    pub const ENCODED_LEN: usize = 100usize;
10292    pub const DEFAULT: Self = Self {
10293        time_usec: 0_u64,
10294        x_acc: 0.0_f32,
10295        y_acc: 0.0_f32,
10296        z_acc: 0.0_f32,
10297        x_vel: 0.0_f32,
10298        y_vel: 0.0_f32,
10299        z_vel: 0.0_f32,
10300        x_pos: 0.0_f32,
10301        y_pos: 0.0_f32,
10302        z_pos: 0.0_f32,
10303        airspeed: 0.0_f32,
10304        vel_variance: [0.0_f32; 3usize],
10305        pos_variance: [0.0_f32; 3usize],
10306        q: [0.0_f32; 4usize],
10307        roll_rate: 0.0_f32,
10308        pitch_rate: 0.0_f32,
10309        yaw_rate: 0.0_f32,
10310    };
10311    #[cfg(feature = "arbitrary")]
10312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10313        use arbitrary::{Arbitrary, Unstructured};
10314        let mut buf = [0u8; 1024];
10315        rng.fill_bytes(&mut buf);
10316        let mut unstructured = Unstructured::new(&buf);
10317        Self::arbitrary(&mut unstructured).unwrap_or_default()
10318    }
10319}
10320impl Default for CONTROL_SYSTEM_STATE_DATA {
10321    fn default() -> Self {
10322        Self::DEFAULT.clone()
10323    }
10324}
10325impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10326    type Message = MavMessage;
10327    const ID: u32 = 146u32;
10328    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10329    const EXTRA_CRC: u8 = 103u8;
10330    const ENCODED_LEN: usize = 100usize;
10331    fn deser(
10332        _version: MavlinkVersion,
10333        __input: &[u8],
10334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10335        let avail_len = __input.len();
10336        let mut payload_buf = [0; Self::ENCODED_LEN];
10337        let mut buf = if avail_len < Self::ENCODED_LEN {
10338            payload_buf[0..avail_len].copy_from_slice(__input);
10339            Bytes::new(&payload_buf)
10340        } else {
10341            Bytes::new(__input)
10342        };
10343        let mut __struct = Self::default();
10344        __struct.time_usec = buf.get_u64_le()?;
10345        __struct.x_acc = buf.get_f32_le()?;
10346        __struct.y_acc = buf.get_f32_le()?;
10347        __struct.z_acc = buf.get_f32_le()?;
10348        __struct.x_vel = buf.get_f32_le()?;
10349        __struct.y_vel = buf.get_f32_le()?;
10350        __struct.z_vel = buf.get_f32_le()?;
10351        __struct.x_pos = buf.get_f32_le()?;
10352        __struct.y_pos = buf.get_f32_le()?;
10353        __struct.z_pos = buf.get_f32_le()?;
10354        __struct.airspeed = buf.get_f32_le()?;
10355        for v in &mut __struct.vel_variance {
10356            let val = buf.get_f32_le()?;
10357            *v = val;
10358        }
10359        for v in &mut __struct.pos_variance {
10360            let val = buf.get_f32_le()?;
10361            *v = val;
10362        }
10363        for v in &mut __struct.q {
10364            let val = buf.get_f32_le()?;
10365            *v = val;
10366        }
10367        __struct.roll_rate = buf.get_f32_le()?;
10368        __struct.pitch_rate = buf.get_f32_le()?;
10369        __struct.yaw_rate = buf.get_f32_le()?;
10370        Ok(__struct)
10371    }
10372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10373        let mut __tmp = BytesMut::new(bytes);
10374        #[allow(clippy::absurd_extreme_comparisons)]
10375        #[allow(unused_comparisons)]
10376        if __tmp.remaining() < Self::ENCODED_LEN {
10377            panic!(
10378                "buffer is too small (need {} bytes, but got {})",
10379                Self::ENCODED_LEN,
10380                __tmp.remaining(),
10381            )
10382        }
10383        __tmp.put_u64_le(self.time_usec);
10384        __tmp.put_f32_le(self.x_acc);
10385        __tmp.put_f32_le(self.y_acc);
10386        __tmp.put_f32_le(self.z_acc);
10387        __tmp.put_f32_le(self.x_vel);
10388        __tmp.put_f32_le(self.y_vel);
10389        __tmp.put_f32_le(self.z_vel);
10390        __tmp.put_f32_le(self.x_pos);
10391        __tmp.put_f32_le(self.y_pos);
10392        __tmp.put_f32_le(self.z_pos);
10393        __tmp.put_f32_le(self.airspeed);
10394        for val in &self.vel_variance {
10395            __tmp.put_f32_le(*val);
10396        }
10397        for val in &self.pos_variance {
10398            __tmp.put_f32_le(*val);
10399        }
10400        for val in &self.q {
10401            __tmp.put_f32_le(*val);
10402        }
10403        __tmp.put_f32_le(self.roll_rate);
10404        __tmp.put_f32_le(self.pitch_rate);
10405        __tmp.put_f32_le(self.yaw_rate);
10406        if matches!(version, MavlinkVersion::V2) {
10407            let len = __tmp.len();
10408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10409        } else {
10410            __tmp.len()
10411        }
10412    }
10413}
10414#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10415#[doc = ""]
10416#[doc = "ID: 411"]
10417#[derive(Debug, Clone, PartialEq)]
10418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10420#[cfg_attr(feature = "ts", derive(TS))]
10421#[cfg_attr(feature = "ts", ts(export))]
10422pub struct CURRENT_EVENT_SEQUENCE_DATA {
10423    #[doc = "Sequence number."]
10424    pub sequence: u16,
10425    #[doc = "Flag bitset."]
10426    pub flags: MavEventCurrentSequenceFlags,
10427}
10428impl CURRENT_EVENT_SEQUENCE_DATA {
10429    pub const ENCODED_LEN: usize = 3usize;
10430    pub const DEFAULT: Self = Self {
10431        sequence: 0_u16,
10432        flags: MavEventCurrentSequenceFlags::DEFAULT,
10433    };
10434    #[cfg(feature = "arbitrary")]
10435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10436        use arbitrary::{Arbitrary, Unstructured};
10437        let mut buf = [0u8; 1024];
10438        rng.fill_bytes(&mut buf);
10439        let mut unstructured = Unstructured::new(&buf);
10440        Self::arbitrary(&mut unstructured).unwrap_or_default()
10441    }
10442}
10443impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10444    fn default() -> Self {
10445        Self::DEFAULT.clone()
10446    }
10447}
10448impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10449    type Message = MavMessage;
10450    const ID: u32 = 411u32;
10451    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10452    const EXTRA_CRC: u8 = 106u8;
10453    const ENCODED_LEN: usize = 3usize;
10454    fn deser(
10455        _version: MavlinkVersion,
10456        __input: &[u8],
10457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10458        let avail_len = __input.len();
10459        let mut payload_buf = [0; Self::ENCODED_LEN];
10460        let mut buf = if avail_len < Self::ENCODED_LEN {
10461            payload_buf[0..avail_len].copy_from_slice(__input);
10462            Bytes::new(&payload_buf)
10463        } else {
10464            Bytes::new(__input)
10465        };
10466        let mut __struct = Self::default();
10467        __struct.sequence = buf.get_u16_le()?;
10468        let tmp = buf.get_u8()?;
10469        __struct.flags =
10470            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10471                enum_type: "MavEventCurrentSequenceFlags",
10472                value: tmp as u64,
10473            })?;
10474        Ok(__struct)
10475    }
10476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10477        let mut __tmp = BytesMut::new(bytes);
10478        #[allow(clippy::absurd_extreme_comparisons)]
10479        #[allow(unused_comparisons)]
10480        if __tmp.remaining() < Self::ENCODED_LEN {
10481            panic!(
10482                "buffer is too small (need {} bytes, but got {})",
10483                Self::ENCODED_LEN,
10484                __tmp.remaining(),
10485            )
10486        }
10487        __tmp.put_u16_le(self.sequence);
10488        __tmp.put_u8(self.flags as u8);
10489        if matches!(version, MavlinkVersion::V2) {
10490            let len = __tmp.len();
10491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10492        } else {
10493            __tmp.len()
10494        }
10495    }
10496}
10497#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10498#[doc = ""]
10499#[doc = "ID: 436"]
10500#[derive(Debug, Clone, PartialEq)]
10501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10503#[cfg_attr(feature = "ts", derive(TS))]
10504#[cfg_attr(feature = "ts", ts(export))]
10505pub struct CURRENT_MODE_DATA {
10506    #[doc = "A bitfield for use for autopilot-specific flags"]
10507    pub custom_mode: u32,
10508    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10509    pub intended_custom_mode: u32,
10510    #[doc = "Standard mode."]
10511    pub standard_mode: MavStandardMode,
10512}
10513impl CURRENT_MODE_DATA {
10514    pub const ENCODED_LEN: usize = 9usize;
10515    pub const DEFAULT: Self = Self {
10516        custom_mode: 0_u32,
10517        intended_custom_mode: 0_u32,
10518        standard_mode: MavStandardMode::DEFAULT,
10519    };
10520    #[cfg(feature = "arbitrary")]
10521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10522        use arbitrary::{Arbitrary, Unstructured};
10523        let mut buf = [0u8; 1024];
10524        rng.fill_bytes(&mut buf);
10525        let mut unstructured = Unstructured::new(&buf);
10526        Self::arbitrary(&mut unstructured).unwrap_or_default()
10527    }
10528}
10529impl Default for CURRENT_MODE_DATA {
10530    fn default() -> Self {
10531        Self::DEFAULT.clone()
10532    }
10533}
10534impl MessageData for CURRENT_MODE_DATA {
10535    type Message = MavMessage;
10536    const ID: u32 = 436u32;
10537    const NAME: &'static str = "CURRENT_MODE";
10538    const EXTRA_CRC: u8 = 193u8;
10539    const ENCODED_LEN: usize = 9usize;
10540    fn deser(
10541        _version: MavlinkVersion,
10542        __input: &[u8],
10543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10544        let avail_len = __input.len();
10545        let mut payload_buf = [0; Self::ENCODED_LEN];
10546        let mut buf = if avail_len < Self::ENCODED_LEN {
10547            payload_buf[0..avail_len].copy_from_slice(__input);
10548            Bytes::new(&payload_buf)
10549        } else {
10550            Bytes::new(__input)
10551        };
10552        let mut __struct = Self::default();
10553        __struct.custom_mode = buf.get_u32_le()?;
10554        __struct.intended_custom_mode = buf.get_u32_le()?;
10555        let tmp = buf.get_u8()?;
10556        __struct.standard_mode =
10557            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10558                enum_type: "MavStandardMode",
10559                value: tmp as u64,
10560            })?;
10561        Ok(__struct)
10562    }
10563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10564        let mut __tmp = BytesMut::new(bytes);
10565        #[allow(clippy::absurd_extreme_comparisons)]
10566        #[allow(unused_comparisons)]
10567        if __tmp.remaining() < Self::ENCODED_LEN {
10568            panic!(
10569                "buffer is too small (need {} bytes, but got {})",
10570                Self::ENCODED_LEN,
10571                __tmp.remaining(),
10572            )
10573        }
10574        __tmp.put_u32_le(self.custom_mode);
10575        __tmp.put_u32_le(self.intended_custom_mode);
10576        __tmp.put_u8(self.standard_mode as u8);
10577        if matches!(version, MavlinkVersion::V2) {
10578            let len = __tmp.len();
10579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10580        } else {
10581            __tmp.len()
10582        }
10583    }
10584}
10585#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10586#[doc = "Data stream status information."]
10587#[doc = ""]
10588#[doc = "ID: 67"]
10589#[derive(Debug, Clone, PartialEq)]
10590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10592#[cfg_attr(feature = "ts", derive(TS))]
10593#[cfg_attr(feature = "ts", ts(export))]
10594pub struct DATA_STREAM_DATA {
10595    #[doc = "The message rate"]
10596    pub message_rate: u16,
10597    #[doc = "The ID of the requested data stream"]
10598    pub stream_id: u8,
10599    #[doc = "1 stream is enabled, 0 stream is stopped."]
10600    pub on_off: u8,
10601}
10602impl DATA_STREAM_DATA {
10603    pub const ENCODED_LEN: usize = 4usize;
10604    pub const DEFAULT: Self = Self {
10605        message_rate: 0_u16,
10606        stream_id: 0_u8,
10607        on_off: 0_u8,
10608    };
10609    #[cfg(feature = "arbitrary")]
10610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10611        use arbitrary::{Arbitrary, Unstructured};
10612        let mut buf = [0u8; 1024];
10613        rng.fill_bytes(&mut buf);
10614        let mut unstructured = Unstructured::new(&buf);
10615        Self::arbitrary(&mut unstructured).unwrap_or_default()
10616    }
10617}
10618impl Default for DATA_STREAM_DATA {
10619    fn default() -> Self {
10620        Self::DEFAULT.clone()
10621    }
10622}
10623impl MessageData for DATA_STREAM_DATA {
10624    type Message = MavMessage;
10625    const ID: u32 = 67u32;
10626    const NAME: &'static str = "DATA_STREAM";
10627    const EXTRA_CRC: u8 = 21u8;
10628    const ENCODED_LEN: usize = 4usize;
10629    fn deser(
10630        _version: MavlinkVersion,
10631        __input: &[u8],
10632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10633        let avail_len = __input.len();
10634        let mut payload_buf = [0; Self::ENCODED_LEN];
10635        let mut buf = if avail_len < Self::ENCODED_LEN {
10636            payload_buf[0..avail_len].copy_from_slice(__input);
10637            Bytes::new(&payload_buf)
10638        } else {
10639            Bytes::new(__input)
10640        };
10641        let mut __struct = Self::default();
10642        __struct.message_rate = buf.get_u16_le()?;
10643        __struct.stream_id = buf.get_u8()?;
10644        __struct.on_off = buf.get_u8()?;
10645        Ok(__struct)
10646    }
10647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10648        let mut __tmp = BytesMut::new(bytes);
10649        #[allow(clippy::absurd_extreme_comparisons)]
10650        #[allow(unused_comparisons)]
10651        if __tmp.remaining() < Self::ENCODED_LEN {
10652            panic!(
10653                "buffer is too small (need {} bytes, but got {})",
10654                Self::ENCODED_LEN,
10655                __tmp.remaining(),
10656            )
10657        }
10658        __tmp.put_u16_le(self.message_rate);
10659        __tmp.put_u8(self.stream_id);
10660        __tmp.put_u8(self.on_off);
10661        if matches!(version, MavlinkVersion::V2) {
10662            let len = __tmp.len();
10663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10664        } else {
10665            __tmp.len()
10666        }
10667    }
10668}
10669#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10670#[doc = ""]
10671#[doc = "ID: 130"]
10672#[derive(Debug, Clone, PartialEq)]
10673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10675#[cfg_attr(feature = "ts", derive(TS))]
10676#[cfg_attr(feature = "ts", ts(export))]
10677pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10678    #[doc = "total data size (set on ACK only)."]
10679    pub size: u32,
10680    #[doc = "Width of a matrix or image."]
10681    pub width: u16,
10682    #[doc = "Height of a matrix or image."]
10683    pub height: u16,
10684    #[doc = "Number of packets being sent (set on ACK only)."]
10685    pub packets: u16,
10686    #[doc = "Type of requested/acknowledged data."]
10687    pub mavtype: MavlinkDataStreamType,
10688    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10689    pub payload: u8,
10690    #[doc = "JPEG quality. Values: [1-100]."]
10691    pub jpg_quality: u8,
10692}
10693impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10694    pub const ENCODED_LEN: usize = 13usize;
10695    pub const DEFAULT: Self = Self {
10696        size: 0_u32,
10697        width: 0_u16,
10698        height: 0_u16,
10699        packets: 0_u16,
10700        mavtype: MavlinkDataStreamType::DEFAULT,
10701        payload: 0_u8,
10702        jpg_quality: 0_u8,
10703    };
10704    #[cfg(feature = "arbitrary")]
10705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10706        use arbitrary::{Arbitrary, Unstructured};
10707        let mut buf = [0u8; 1024];
10708        rng.fill_bytes(&mut buf);
10709        let mut unstructured = Unstructured::new(&buf);
10710        Self::arbitrary(&mut unstructured).unwrap_or_default()
10711    }
10712}
10713impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10714    fn default() -> Self {
10715        Self::DEFAULT.clone()
10716    }
10717}
10718impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10719    type Message = MavMessage;
10720    const ID: u32 = 130u32;
10721    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10722    const EXTRA_CRC: u8 = 29u8;
10723    const ENCODED_LEN: usize = 13usize;
10724    fn deser(
10725        _version: MavlinkVersion,
10726        __input: &[u8],
10727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10728        let avail_len = __input.len();
10729        let mut payload_buf = [0; Self::ENCODED_LEN];
10730        let mut buf = if avail_len < Self::ENCODED_LEN {
10731            payload_buf[0..avail_len].copy_from_slice(__input);
10732            Bytes::new(&payload_buf)
10733        } else {
10734            Bytes::new(__input)
10735        };
10736        let mut __struct = Self::default();
10737        __struct.size = buf.get_u32_le()?;
10738        __struct.width = buf.get_u16_le()?;
10739        __struct.height = buf.get_u16_le()?;
10740        __struct.packets = buf.get_u16_le()?;
10741        let tmp = buf.get_u8()?;
10742        __struct.mavtype =
10743            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10744                enum_type: "MavlinkDataStreamType",
10745                value: tmp as u64,
10746            })?;
10747        __struct.payload = buf.get_u8()?;
10748        __struct.jpg_quality = buf.get_u8()?;
10749        Ok(__struct)
10750    }
10751    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10752        let mut __tmp = BytesMut::new(bytes);
10753        #[allow(clippy::absurd_extreme_comparisons)]
10754        #[allow(unused_comparisons)]
10755        if __tmp.remaining() < Self::ENCODED_LEN {
10756            panic!(
10757                "buffer is too small (need {} bytes, but got {})",
10758                Self::ENCODED_LEN,
10759                __tmp.remaining(),
10760            )
10761        }
10762        __tmp.put_u32_le(self.size);
10763        __tmp.put_u16_le(self.width);
10764        __tmp.put_u16_le(self.height);
10765        __tmp.put_u16_le(self.packets);
10766        __tmp.put_u8(self.mavtype as u8);
10767        __tmp.put_u8(self.payload);
10768        __tmp.put_u8(self.jpg_quality);
10769        if matches!(version, MavlinkVersion::V2) {
10770            let len = __tmp.len();
10771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10772        } else {
10773            __tmp.len()
10774        }
10775    }
10776}
10777#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10778#[doc = ""]
10779#[doc = "ID: 254"]
10780#[derive(Debug, Clone, PartialEq)]
10781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10783#[cfg_attr(feature = "ts", derive(TS))]
10784#[cfg_attr(feature = "ts", ts(export))]
10785pub struct DEBUG_DATA {
10786    #[doc = "Timestamp (time since system boot)."]
10787    pub time_boot_ms: u32,
10788    #[doc = "DEBUG value"]
10789    pub value: f32,
10790    #[doc = "index of debug variable"]
10791    pub ind: u8,
10792}
10793impl DEBUG_DATA {
10794    pub const ENCODED_LEN: usize = 9usize;
10795    pub const DEFAULT: Self = Self {
10796        time_boot_ms: 0_u32,
10797        value: 0.0_f32,
10798        ind: 0_u8,
10799    };
10800    #[cfg(feature = "arbitrary")]
10801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10802        use arbitrary::{Arbitrary, Unstructured};
10803        let mut buf = [0u8; 1024];
10804        rng.fill_bytes(&mut buf);
10805        let mut unstructured = Unstructured::new(&buf);
10806        Self::arbitrary(&mut unstructured).unwrap_or_default()
10807    }
10808}
10809impl Default for DEBUG_DATA {
10810    fn default() -> Self {
10811        Self::DEFAULT.clone()
10812    }
10813}
10814impl MessageData for DEBUG_DATA {
10815    type Message = MavMessage;
10816    const ID: u32 = 254u32;
10817    const NAME: &'static str = "DEBUG";
10818    const EXTRA_CRC: u8 = 46u8;
10819    const ENCODED_LEN: usize = 9usize;
10820    fn deser(
10821        _version: MavlinkVersion,
10822        __input: &[u8],
10823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10824        let avail_len = __input.len();
10825        let mut payload_buf = [0; Self::ENCODED_LEN];
10826        let mut buf = if avail_len < Self::ENCODED_LEN {
10827            payload_buf[0..avail_len].copy_from_slice(__input);
10828            Bytes::new(&payload_buf)
10829        } else {
10830            Bytes::new(__input)
10831        };
10832        let mut __struct = Self::default();
10833        __struct.time_boot_ms = buf.get_u32_le()?;
10834        __struct.value = buf.get_f32_le()?;
10835        __struct.ind = buf.get_u8()?;
10836        Ok(__struct)
10837    }
10838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10839        let mut __tmp = BytesMut::new(bytes);
10840        #[allow(clippy::absurd_extreme_comparisons)]
10841        #[allow(unused_comparisons)]
10842        if __tmp.remaining() < Self::ENCODED_LEN {
10843            panic!(
10844                "buffer is too small (need {} bytes, but got {})",
10845                Self::ENCODED_LEN,
10846                __tmp.remaining(),
10847            )
10848        }
10849        __tmp.put_u32_le(self.time_boot_ms);
10850        __tmp.put_f32_le(self.value);
10851        __tmp.put_u8(self.ind);
10852        if matches!(version, MavlinkVersion::V2) {
10853            let len = __tmp.len();
10854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10855        } else {
10856            __tmp.len()
10857        }
10858    }
10859}
10860#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10861#[doc = ""]
10862#[doc = "ID: 350"]
10863#[derive(Debug, Clone, PartialEq)]
10864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10866#[cfg_attr(feature = "ts", derive(TS))]
10867#[cfg_attr(feature = "ts", ts(export))]
10868pub struct DEBUG_FLOAT_ARRAY_DATA {
10869    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10870    pub time_usec: u64,
10871    #[doc = "Unique ID used to discriminate between arrays"]
10872    pub array_id: u16,
10873    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10874    #[cfg_attr(feature = "ts", ts(type = "string"))]
10875    pub name: CharArray<10>,
10876    #[doc = "data"]
10877    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10879    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10880    pub data: [f32; 58],
10881}
10882impl DEBUG_FLOAT_ARRAY_DATA {
10883    pub const ENCODED_LEN: usize = 252usize;
10884    pub const DEFAULT: Self = Self {
10885        time_usec: 0_u64,
10886        array_id: 0_u16,
10887        name: CharArray::new([0_u8; 10usize]),
10888        data: [0.0_f32; 58usize],
10889    };
10890    #[cfg(feature = "arbitrary")]
10891    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10892        use arbitrary::{Arbitrary, Unstructured};
10893        let mut buf = [0u8; 1024];
10894        rng.fill_bytes(&mut buf);
10895        let mut unstructured = Unstructured::new(&buf);
10896        Self::arbitrary(&mut unstructured).unwrap_or_default()
10897    }
10898}
10899impl Default for DEBUG_FLOAT_ARRAY_DATA {
10900    fn default() -> Self {
10901        Self::DEFAULT.clone()
10902    }
10903}
10904impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10905    type Message = MavMessage;
10906    const ID: u32 = 350u32;
10907    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10908    const EXTRA_CRC: u8 = 232u8;
10909    const ENCODED_LEN: usize = 252usize;
10910    fn deser(
10911        _version: MavlinkVersion,
10912        __input: &[u8],
10913    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10914        let avail_len = __input.len();
10915        let mut payload_buf = [0; Self::ENCODED_LEN];
10916        let mut buf = if avail_len < Self::ENCODED_LEN {
10917            payload_buf[0..avail_len].copy_from_slice(__input);
10918            Bytes::new(&payload_buf)
10919        } else {
10920            Bytes::new(__input)
10921        };
10922        let mut __struct = Self::default();
10923        __struct.time_usec = buf.get_u64_le()?;
10924        __struct.array_id = buf.get_u16_le()?;
10925        let mut tmp = [0_u8; 10usize];
10926        for v in &mut tmp {
10927            *v = buf.get_u8()?;
10928        }
10929        __struct.name = CharArray::new(tmp);
10930        for v in &mut __struct.data {
10931            let val = buf.get_f32_le()?;
10932            *v = val;
10933        }
10934        Ok(__struct)
10935    }
10936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10937        let mut __tmp = BytesMut::new(bytes);
10938        #[allow(clippy::absurd_extreme_comparisons)]
10939        #[allow(unused_comparisons)]
10940        if __tmp.remaining() < Self::ENCODED_LEN {
10941            panic!(
10942                "buffer is too small (need {} bytes, but got {})",
10943                Self::ENCODED_LEN,
10944                __tmp.remaining(),
10945            )
10946        }
10947        __tmp.put_u64_le(self.time_usec);
10948        __tmp.put_u16_le(self.array_id);
10949        for val in &self.name {
10950            __tmp.put_u8(*val);
10951        }
10952        if matches!(version, MavlinkVersion::V2) {
10953            for val in &self.data {
10954                __tmp.put_f32_le(*val);
10955            }
10956            let len = __tmp.len();
10957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10958        } else {
10959            __tmp.len()
10960        }
10961    }
10962}
10963#[doc = "To debug something using a named 3D vector."]
10964#[doc = ""]
10965#[doc = "ID: 250"]
10966#[derive(Debug, Clone, PartialEq)]
10967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10969#[cfg_attr(feature = "ts", derive(TS))]
10970#[cfg_attr(feature = "ts", ts(export))]
10971pub struct DEBUG_VECT_DATA {
10972    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10973    pub time_usec: u64,
10974    #[doc = "x"]
10975    pub x: f32,
10976    #[doc = "y"]
10977    pub y: f32,
10978    #[doc = "z"]
10979    pub z: f32,
10980    #[doc = "Name"]
10981    #[cfg_attr(feature = "ts", ts(type = "string"))]
10982    pub name: CharArray<10>,
10983}
10984impl DEBUG_VECT_DATA {
10985    pub const ENCODED_LEN: usize = 30usize;
10986    pub const DEFAULT: Self = Self {
10987        time_usec: 0_u64,
10988        x: 0.0_f32,
10989        y: 0.0_f32,
10990        z: 0.0_f32,
10991        name: CharArray::new([0_u8; 10usize]),
10992    };
10993    #[cfg(feature = "arbitrary")]
10994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10995        use arbitrary::{Arbitrary, Unstructured};
10996        let mut buf = [0u8; 1024];
10997        rng.fill_bytes(&mut buf);
10998        let mut unstructured = Unstructured::new(&buf);
10999        Self::arbitrary(&mut unstructured).unwrap_or_default()
11000    }
11001}
11002impl Default for DEBUG_VECT_DATA {
11003    fn default() -> Self {
11004        Self::DEFAULT.clone()
11005    }
11006}
11007impl MessageData for DEBUG_VECT_DATA {
11008    type Message = MavMessage;
11009    const ID: u32 = 250u32;
11010    const NAME: &'static str = "DEBUG_VECT";
11011    const EXTRA_CRC: u8 = 49u8;
11012    const ENCODED_LEN: usize = 30usize;
11013    fn deser(
11014        _version: MavlinkVersion,
11015        __input: &[u8],
11016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11017        let avail_len = __input.len();
11018        let mut payload_buf = [0; Self::ENCODED_LEN];
11019        let mut buf = if avail_len < Self::ENCODED_LEN {
11020            payload_buf[0..avail_len].copy_from_slice(__input);
11021            Bytes::new(&payload_buf)
11022        } else {
11023            Bytes::new(__input)
11024        };
11025        let mut __struct = Self::default();
11026        __struct.time_usec = buf.get_u64_le()?;
11027        __struct.x = buf.get_f32_le()?;
11028        __struct.y = buf.get_f32_le()?;
11029        __struct.z = buf.get_f32_le()?;
11030        let mut tmp = [0_u8; 10usize];
11031        for v in &mut tmp {
11032            *v = buf.get_u8()?;
11033        }
11034        __struct.name = CharArray::new(tmp);
11035        Ok(__struct)
11036    }
11037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11038        let mut __tmp = BytesMut::new(bytes);
11039        #[allow(clippy::absurd_extreme_comparisons)]
11040        #[allow(unused_comparisons)]
11041        if __tmp.remaining() < Self::ENCODED_LEN {
11042            panic!(
11043                "buffer is too small (need {} bytes, but got {})",
11044                Self::ENCODED_LEN,
11045                __tmp.remaining(),
11046            )
11047        }
11048        __tmp.put_u64_le(self.time_usec);
11049        __tmp.put_f32_le(self.x);
11050        __tmp.put_f32_le(self.y);
11051        __tmp.put_f32_le(self.z);
11052        for val in &self.name {
11053            __tmp.put_u8(*val);
11054        }
11055        if matches!(version, MavlinkVersion::V2) {
11056            let len = __tmp.len();
11057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11058        } else {
11059            __tmp.len()
11060        }
11061    }
11062}
11063#[doc = "Distance sensor information for an onboard rangefinder."]
11064#[doc = ""]
11065#[doc = "ID: 132"]
11066#[derive(Debug, Clone, PartialEq)]
11067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11069#[cfg_attr(feature = "ts", derive(TS))]
11070#[cfg_attr(feature = "ts", ts(export))]
11071pub struct DISTANCE_SENSOR_DATA {
11072    #[doc = "Timestamp (time since system boot)."]
11073    pub time_boot_ms: u32,
11074    #[doc = "Minimum distance the sensor can measure"]
11075    pub min_distance: u16,
11076    #[doc = "Maximum distance the sensor can measure"]
11077    pub max_distance: u16,
11078    #[doc = "Current distance reading"]
11079    pub current_distance: u16,
11080    #[doc = "Type of distance sensor."]
11081    pub mavtype: MavDistanceSensor,
11082    #[doc = "Onboard ID of the sensor"]
11083    pub id: u8,
11084    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11085    pub orientation: MavSensorOrientation,
11086    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11087    pub covariance: u8,
11088    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11090    pub horizontal_fov: f32,
11091    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11093    pub vertical_fov: f32,
11094    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11096    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11097    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11098    pub quaternion: [f32; 4],
11099    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11100    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11101    pub signal_quality: u8,
11102}
11103impl DISTANCE_SENSOR_DATA {
11104    pub const ENCODED_LEN: usize = 39usize;
11105    pub const DEFAULT: Self = Self {
11106        time_boot_ms: 0_u32,
11107        min_distance: 0_u16,
11108        max_distance: 0_u16,
11109        current_distance: 0_u16,
11110        mavtype: MavDistanceSensor::DEFAULT,
11111        id: 0_u8,
11112        orientation: MavSensorOrientation::DEFAULT,
11113        covariance: 0_u8,
11114        horizontal_fov: 0.0_f32,
11115        vertical_fov: 0.0_f32,
11116        quaternion: [0.0_f32; 4usize],
11117        signal_quality: 0_u8,
11118    };
11119    #[cfg(feature = "arbitrary")]
11120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11121        use arbitrary::{Arbitrary, Unstructured};
11122        let mut buf = [0u8; 1024];
11123        rng.fill_bytes(&mut buf);
11124        let mut unstructured = Unstructured::new(&buf);
11125        Self::arbitrary(&mut unstructured).unwrap_or_default()
11126    }
11127}
11128impl Default for DISTANCE_SENSOR_DATA {
11129    fn default() -> Self {
11130        Self::DEFAULT.clone()
11131    }
11132}
11133impl MessageData for DISTANCE_SENSOR_DATA {
11134    type Message = MavMessage;
11135    const ID: u32 = 132u32;
11136    const NAME: &'static str = "DISTANCE_SENSOR";
11137    const EXTRA_CRC: u8 = 85u8;
11138    const ENCODED_LEN: usize = 39usize;
11139    fn deser(
11140        _version: MavlinkVersion,
11141        __input: &[u8],
11142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11143        let avail_len = __input.len();
11144        let mut payload_buf = [0; Self::ENCODED_LEN];
11145        let mut buf = if avail_len < Self::ENCODED_LEN {
11146            payload_buf[0..avail_len].copy_from_slice(__input);
11147            Bytes::new(&payload_buf)
11148        } else {
11149            Bytes::new(__input)
11150        };
11151        let mut __struct = Self::default();
11152        __struct.time_boot_ms = buf.get_u32_le()?;
11153        __struct.min_distance = buf.get_u16_le()?;
11154        __struct.max_distance = buf.get_u16_le()?;
11155        __struct.current_distance = buf.get_u16_le()?;
11156        let tmp = buf.get_u8()?;
11157        __struct.mavtype =
11158            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11159                enum_type: "MavDistanceSensor",
11160                value: tmp as u64,
11161            })?;
11162        __struct.id = buf.get_u8()?;
11163        let tmp = buf.get_u8()?;
11164        __struct.orientation =
11165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11166                enum_type: "MavSensorOrientation",
11167                value: tmp as u64,
11168            })?;
11169        __struct.covariance = buf.get_u8()?;
11170        __struct.horizontal_fov = buf.get_f32_le()?;
11171        __struct.vertical_fov = buf.get_f32_le()?;
11172        for v in &mut __struct.quaternion {
11173            let val = buf.get_f32_le()?;
11174            *v = val;
11175        }
11176        __struct.signal_quality = buf.get_u8()?;
11177        Ok(__struct)
11178    }
11179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11180        let mut __tmp = BytesMut::new(bytes);
11181        #[allow(clippy::absurd_extreme_comparisons)]
11182        #[allow(unused_comparisons)]
11183        if __tmp.remaining() < Self::ENCODED_LEN {
11184            panic!(
11185                "buffer is too small (need {} bytes, but got {})",
11186                Self::ENCODED_LEN,
11187                __tmp.remaining(),
11188            )
11189        }
11190        __tmp.put_u32_le(self.time_boot_ms);
11191        __tmp.put_u16_le(self.min_distance);
11192        __tmp.put_u16_le(self.max_distance);
11193        __tmp.put_u16_le(self.current_distance);
11194        __tmp.put_u8(self.mavtype as u8);
11195        __tmp.put_u8(self.id);
11196        __tmp.put_u8(self.orientation as u8);
11197        __tmp.put_u8(self.covariance);
11198        if matches!(version, MavlinkVersion::V2) {
11199            __tmp.put_f32_le(self.horizontal_fov);
11200            __tmp.put_f32_le(self.vertical_fov);
11201            for val in &self.quaternion {
11202                __tmp.put_f32_le(*val);
11203            }
11204            __tmp.put_u8(self.signal_quality);
11205            let len = __tmp.len();
11206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11207        } else {
11208            __tmp.len()
11209        }
11210    }
11211}
11212#[doc = "EFI status output."]
11213#[doc = ""]
11214#[doc = "ID: 225"]
11215#[derive(Debug, Clone, PartialEq)]
11216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11218#[cfg_attr(feature = "ts", derive(TS))]
11219#[cfg_attr(feature = "ts", ts(export))]
11220pub struct EFI_STATUS_DATA {
11221    #[doc = "ECU index"]
11222    pub ecu_index: f32,
11223    #[doc = "RPM"]
11224    pub rpm: f32,
11225    #[doc = "Fuel consumed"]
11226    pub fuel_consumed: f32,
11227    #[doc = "Fuel flow rate"]
11228    pub fuel_flow: f32,
11229    #[doc = "Engine load"]
11230    pub engine_load: f32,
11231    #[doc = "Throttle position"]
11232    pub throttle_position: f32,
11233    #[doc = "Spark dwell time"]
11234    pub spark_dwell_time: f32,
11235    #[doc = "Barometric pressure"]
11236    pub barometric_pressure: f32,
11237    #[doc = "Intake manifold pressure("]
11238    pub intake_manifold_pressure: f32,
11239    #[doc = "Intake manifold temperature"]
11240    pub intake_manifold_temperature: f32,
11241    #[doc = "Cylinder head temperature"]
11242    pub cylinder_head_temperature: f32,
11243    #[doc = "Ignition timing (Crank angle degrees)"]
11244    pub ignition_timing: f32,
11245    #[doc = "Injection time"]
11246    pub injection_time: f32,
11247    #[doc = "Exhaust gas temperature"]
11248    pub exhaust_gas_temperature: f32,
11249    #[doc = "Output throttle"]
11250    pub throttle_out: f32,
11251    #[doc = "Pressure/temperature compensation"]
11252    pub pt_compensation: f32,
11253    #[doc = "EFI health status"]
11254    pub health: u8,
11255    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11257    pub ignition_voltage: f32,
11258    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11260    pub fuel_pressure: f32,
11261}
11262impl EFI_STATUS_DATA {
11263    pub const ENCODED_LEN: usize = 73usize;
11264    pub const DEFAULT: Self = Self {
11265        ecu_index: 0.0_f32,
11266        rpm: 0.0_f32,
11267        fuel_consumed: 0.0_f32,
11268        fuel_flow: 0.0_f32,
11269        engine_load: 0.0_f32,
11270        throttle_position: 0.0_f32,
11271        spark_dwell_time: 0.0_f32,
11272        barometric_pressure: 0.0_f32,
11273        intake_manifold_pressure: 0.0_f32,
11274        intake_manifold_temperature: 0.0_f32,
11275        cylinder_head_temperature: 0.0_f32,
11276        ignition_timing: 0.0_f32,
11277        injection_time: 0.0_f32,
11278        exhaust_gas_temperature: 0.0_f32,
11279        throttle_out: 0.0_f32,
11280        pt_compensation: 0.0_f32,
11281        health: 0_u8,
11282        ignition_voltage: 0.0_f32,
11283        fuel_pressure: 0.0_f32,
11284    };
11285    #[cfg(feature = "arbitrary")]
11286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11287        use arbitrary::{Arbitrary, Unstructured};
11288        let mut buf = [0u8; 1024];
11289        rng.fill_bytes(&mut buf);
11290        let mut unstructured = Unstructured::new(&buf);
11291        Self::arbitrary(&mut unstructured).unwrap_or_default()
11292    }
11293}
11294impl Default for EFI_STATUS_DATA {
11295    fn default() -> Self {
11296        Self::DEFAULT.clone()
11297    }
11298}
11299impl MessageData for EFI_STATUS_DATA {
11300    type Message = MavMessage;
11301    const ID: u32 = 225u32;
11302    const NAME: &'static str = "EFI_STATUS";
11303    const EXTRA_CRC: u8 = 208u8;
11304    const ENCODED_LEN: usize = 73usize;
11305    fn deser(
11306        _version: MavlinkVersion,
11307        __input: &[u8],
11308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11309        let avail_len = __input.len();
11310        let mut payload_buf = [0; Self::ENCODED_LEN];
11311        let mut buf = if avail_len < Self::ENCODED_LEN {
11312            payload_buf[0..avail_len].copy_from_slice(__input);
11313            Bytes::new(&payload_buf)
11314        } else {
11315            Bytes::new(__input)
11316        };
11317        let mut __struct = Self::default();
11318        __struct.ecu_index = buf.get_f32_le()?;
11319        __struct.rpm = buf.get_f32_le()?;
11320        __struct.fuel_consumed = buf.get_f32_le()?;
11321        __struct.fuel_flow = buf.get_f32_le()?;
11322        __struct.engine_load = buf.get_f32_le()?;
11323        __struct.throttle_position = buf.get_f32_le()?;
11324        __struct.spark_dwell_time = buf.get_f32_le()?;
11325        __struct.barometric_pressure = buf.get_f32_le()?;
11326        __struct.intake_manifold_pressure = buf.get_f32_le()?;
11327        __struct.intake_manifold_temperature = buf.get_f32_le()?;
11328        __struct.cylinder_head_temperature = buf.get_f32_le()?;
11329        __struct.ignition_timing = buf.get_f32_le()?;
11330        __struct.injection_time = buf.get_f32_le()?;
11331        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
11332        __struct.throttle_out = buf.get_f32_le()?;
11333        __struct.pt_compensation = buf.get_f32_le()?;
11334        __struct.health = buf.get_u8()?;
11335        __struct.ignition_voltage = buf.get_f32_le()?;
11336        __struct.fuel_pressure = buf.get_f32_le()?;
11337        Ok(__struct)
11338    }
11339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11340        let mut __tmp = BytesMut::new(bytes);
11341        #[allow(clippy::absurd_extreme_comparisons)]
11342        #[allow(unused_comparisons)]
11343        if __tmp.remaining() < Self::ENCODED_LEN {
11344            panic!(
11345                "buffer is too small (need {} bytes, but got {})",
11346                Self::ENCODED_LEN,
11347                __tmp.remaining(),
11348            )
11349        }
11350        __tmp.put_f32_le(self.ecu_index);
11351        __tmp.put_f32_le(self.rpm);
11352        __tmp.put_f32_le(self.fuel_consumed);
11353        __tmp.put_f32_le(self.fuel_flow);
11354        __tmp.put_f32_le(self.engine_load);
11355        __tmp.put_f32_le(self.throttle_position);
11356        __tmp.put_f32_le(self.spark_dwell_time);
11357        __tmp.put_f32_le(self.barometric_pressure);
11358        __tmp.put_f32_le(self.intake_manifold_pressure);
11359        __tmp.put_f32_le(self.intake_manifold_temperature);
11360        __tmp.put_f32_le(self.cylinder_head_temperature);
11361        __tmp.put_f32_le(self.ignition_timing);
11362        __tmp.put_f32_le(self.injection_time);
11363        __tmp.put_f32_le(self.exhaust_gas_temperature);
11364        __tmp.put_f32_le(self.throttle_out);
11365        __tmp.put_f32_le(self.pt_compensation);
11366        __tmp.put_u8(self.health);
11367        if matches!(version, MavlinkVersion::V2) {
11368            __tmp.put_f32_le(self.ignition_voltage);
11369            __tmp.put_f32_le(self.fuel_pressure);
11370            let len = __tmp.len();
11371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11372        } else {
11373            __tmp.len()
11374        }
11375    }
11376}
11377#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11378#[doc = ""]
11379#[doc = "ID: 131"]
11380#[derive(Debug, Clone, PartialEq)]
11381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11383#[cfg_attr(feature = "ts", derive(TS))]
11384#[cfg_attr(feature = "ts", ts(export))]
11385pub struct ENCAPSULATED_DATA_DATA {
11386    #[doc = "sequence number (starting with 0 on every transmission)"]
11387    pub seqnr: u16,
11388    #[doc = "image data bytes"]
11389    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11390    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11391    pub data: [u8; 253],
11392}
11393impl ENCAPSULATED_DATA_DATA {
11394    pub const ENCODED_LEN: usize = 255usize;
11395    pub const DEFAULT: Self = Self {
11396        seqnr: 0_u16,
11397        data: [0_u8; 253usize],
11398    };
11399    #[cfg(feature = "arbitrary")]
11400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11401        use arbitrary::{Arbitrary, Unstructured};
11402        let mut buf = [0u8; 1024];
11403        rng.fill_bytes(&mut buf);
11404        let mut unstructured = Unstructured::new(&buf);
11405        Self::arbitrary(&mut unstructured).unwrap_or_default()
11406    }
11407}
11408impl Default for ENCAPSULATED_DATA_DATA {
11409    fn default() -> Self {
11410        Self::DEFAULT.clone()
11411    }
11412}
11413impl MessageData for ENCAPSULATED_DATA_DATA {
11414    type Message = MavMessage;
11415    const ID: u32 = 131u32;
11416    const NAME: &'static str = "ENCAPSULATED_DATA";
11417    const EXTRA_CRC: u8 = 223u8;
11418    const ENCODED_LEN: usize = 255usize;
11419    fn deser(
11420        _version: MavlinkVersion,
11421        __input: &[u8],
11422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11423        let avail_len = __input.len();
11424        let mut payload_buf = [0; Self::ENCODED_LEN];
11425        let mut buf = if avail_len < Self::ENCODED_LEN {
11426            payload_buf[0..avail_len].copy_from_slice(__input);
11427            Bytes::new(&payload_buf)
11428        } else {
11429            Bytes::new(__input)
11430        };
11431        let mut __struct = Self::default();
11432        __struct.seqnr = buf.get_u16_le()?;
11433        for v in &mut __struct.data {
11434            let val = buf.get_u8()?;
11435            *v = val;
11436        }
11437        Ok(__struct)
11438    }
11439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11440        let mut __tmp = BytesMut::new(bytes);
11441        #[allow(clippy::absurd_extreme_comparisons)]
11442        #[allow(unused_comparisons)]
11443        if __tmp.remaining() < Self::ENCODED_LEN {
11444            panic!(
11445                "buffer is too small (need {} bytes, but got {})",
11446                Self::ENCODED_LEN,
11447                __tmp.remaining(),
11448            )
11449        }
11450        __tmp.put_u16_le(self.seqnr);
11451        for val in &self.data {
11452            __tmp.put_u8(*val);
11453        }
11454        if matches!(version, MavlinkVersion::V2) {
11455            let len = __tmp.len();
11456            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11457        } else {
11458            __tmp.len()
11459        }
11460    }
11461}
11462#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11463#[doc = ""]
11464#[doc = "ID: 290"]
11465#[derive(Debug, Clone, PartialEq)]
11466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11468#[cfg_attr(feature = "ts", derive(TS))]
11469#[cfg_attr(feature = "ts", ts(export))]
11470pub struct ESC_INFO_DATA {
11471    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11472    pub time_usec: u64,
11473    #[doc = "Number of reported errors by each ESC since boot."]
11474    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11475    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11476    pub error_count: [u32; 4],
11477    #[doc = "Counter of data packets received."]
11478    pub counter: u16,
11479    #[doc = "Bitmap of ESC failure flags."]
11480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11481    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11482    pub failure_flags: [u16; 4],
11483    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11485    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11486    pub temperature: [i16; 4],
11487    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11488    pub index: u8,
11489    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11490    pub count: u8,
11491    #[doc = "Connection type protocol for all ESC."]
11492    pub connection_type: EscConnectionType,
11493    #[doc = "Information regarding online/offline status of each ESC."]
11494    pub info: u8,
11495}
11496impl ESC_INFO_DATA {
11497    pub const ENCODED_LEN: usize = 46usize;
11498    pub const DEFAULT: Self = Self {
11499        time_usec: 0_u64,
11500        error_count: [0_u32; 4usize],
11501        counter: 0_u16,
11502        failure_flags: [0_u16; 4usize],
11503        temperature: [0_i16; 4usize],
11504        index: 0_u8,
11505        count: 0_u8,
11506        connection_type: EscConnectionType::DEFAULT,
11507        info: 0_u8,
11508    };
11509    #[cfg(feature = "arbitrary")]
11510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11511        use arbitrary::{Arbitrary, Unstructured};
11512        let mut buf = [0u8; 1024];
11513        rng.fill_bytes(&mut buf);
11514        let mut unstructured = Unstructured::new(&buf);
11515        Self::arbitrary(&mut unstructured).unwrap_or_default()
11516    }
11517}
11518impl Default for ESC_INFO_DATA {
11519    fn default() -> Self {
11520        Self::DEFAULT.clone()
11521    }
11522}
11523impl MessageData for ESC_INFO_DATA {
11524    type Message = MavMessage;
11525    const ID: u32 = 290u32;
11526    const NAME: &'static str = "ESC_INFO";
11527    const EXTRA_CRC: u8 = 251u8;
11528    const ENCODED_LEN: usize = 46usize;
11529    fn deser(
11530        _version: MavlinkVersion,
11531        __input: &[u8],
11532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11533        let avail_len = __input.len();
11534        let mut payload_buf = [0; Self::ENCODED_LEN];
11535        let mut buf = if avail_len < Self::ENCODED_LEN {
11536            payload_buf[0..avail_len].copy_from_slice(__input);
11537            Bytes::new(&payload_buf)
11538        } else {
11539            Bytes::new(__input)
11540        };
11541        let mut __struct = Self::default();
11542        __struct.time_usec = buf.get_u64_le()?;
11543        for v in &mut __struct.error_count {
11544            let val = buf.get_u32_le()?;
11545            *v = val;
11546        }
11547        __struct.counter = buf.get_u16_le()?;
11548        for v in &mut __struct.failure_flags {
11549            let val = buf.get_u16_le()?;
11550            *v = val;
11551        }
11552        for v in &mut __struct.temperature {
11553            let val = buf.get_i16_le()?;
11554            *v = val;
11555        }
11556        __struct.index = buf.get_u8()?;
11557        __struct.count = buf.get_u8()?;
11558        let tmp = buf.get_u8()?;
11559        __struct.connection_type =
11560            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11561                enum_type: "EscConnectionType",
11562                value: tmp as u64,
11563            })?;
11564        __struct.info = buf.get_u8()?;
11565        Ok(__struct)
11566    }
11567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11568        let mut __tmp = BytesMut::new(bytes);
11569        #[allow(clippy::absurd_extreme_comparisons)]
11570        #[allow(unused_comparisons)]
11571        if __tmp.remaining() < Self::ENCODED_LEN {
11572            panic!(
11573                "buffer is too small (need {} bytes, but got {})",
11574                Self::ENCODED_LEN,
11575                __tmp.remaining(),
11576            )
11577        }
11578        __tmp.put_u64_le(self.time_usec);
11579        for val in &self.error_count {
11580            __tmp.put_u32_le(*val);
11581        }
11582        __tmp.put_u16_le(self.counter);
11583        for val in &self.failure_flags {
11584            __tmp.put_u16_le(*val);
11585        }
11586        for val in &self.temperature {
11587            __tmp.put_i16_le(*val);
11588        }
11589        __tmp.put_u8(self.index);
11590        __tmp.put_u8(self.count);
11591        __tmp.put_u8(self.connection_type as u8);
11592        __tmp.put_u8(self.info);
11593        if matches!(version, MavlinkVersion::V2) {
11594            let len = __tmp.len();
11595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11596        } else {
11597            __tmp.len()
11598        }
11599    }
11600}
11601#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11602#[doc = ""]
11603#[doc = "ID: 291"]
11604#[derive(Debug, Clone, PartialEq)]
11605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11607#[cfg_attr(feature = "ts", derive(TS))]
11608#[cfg_attr(feature = "ts", ts(export))]
11609pub struct ESC_STATUS_DATA {
11610    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11611    pub time_usec: u64,
11612    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11615    pub rpm: [i32; 4],
11616    #[doc = "Voltage measured from each ESC."]
11617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11619    pub voltage: [f32; 4],
11620    #[doc = "Current measured from each ESC."]
11621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11622    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11623    pub current: [f32; 4],
11624    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11625    pub index: u8,
11626}
11627impl ESC_STATUS_DATA {
11628    pub const ENCODED_LEN: usize = 57usize;
11629    pub const DEFAULT: Self = Self {
11630        time_usec: 0_u64,
11631        rpm: [0_i32; 4usize],
11632        voltage: [0.0_f32; 4usize],
11633        current: [0.0_f32; 4usize],
11634        index: 0_u8,
11635    };
11636    #[cfg(feature = "arbitrary")]
11637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11638        use arbitrary::{Arbitrary, Unstructured};
11639        let mut buf = [0u8; 1024];
11640        rng.fill_bytes(&mut buf);
11641        let mut unstructured = Unstructured::new(&buf);
11642        Self::arbitrary(&mut unstructured).unwrap_or_default()
11643    }
11644}
11645impl Default for ESC_STATUS_DATA {
11646    fn default() -> Self {
11647        Self::DEFAULT.clone()
11648    }
11649}
11650impl MessageData for ESC_STATUS_DATA {
11651    type Message = MavMessage;
11652    const ID: u32 = 291u32;
11653    const NAME: &'static str = "ESC_STATUS";
11654    const EXTRA_CRC: u8 = 10u8;
11655    const ENCODED_LEN: usize = 57usize;
11656    fn deser(
11657        _version: MavlinkVersion,
11658        __input: &[u8],
11659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11660        let avail_len = __input.len();
11661        let mut payload_buf = [0; Self::ENCODED_LEN];
11662        let mut buf = if avail_len < Self::ENCODED_LEN {
11663            payload_buf[0..avail_len].copy_from_slice(__input);
11664            Bytes::new(&payload_buf)
11665        } else {
11666            Bytes::new(__input)
11667        };
11668        let mut __struct = Self::default();
11669        __struct.time_usec = buf.get_u64_le()?;
11670        for v in &mut __struct.rpm {
11671            let val = buf.get_i32_le()?;
11672            *v = val;
11673        }
11674        for v in &mut __struct.voltage {
11675            let val = buf.get_f32_le()?;
11676            *v = val;
11677        }
11678        for v in &mut __struct.current {
11679            let val = buf.get_f32_le()?;
11680            *v = val;
11681        }
11682        __struct.index = buf.get_u8()?;
11683        Ok(__struct)
11684    }
11685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11686        let mut __tmp = BytesMut::new(bytes);
11687        #[allow(clippy::absurd_extreme_comparisons)]
11688        #[allow(unused_comparisons)]
11689        if __tmp.remaining() < Self::ENCODED_LEN {
11690            panic!(
11691                "buffer is too small (need {} bytes, but got {})",
11692                Self::ENCODED_LEN,
11693                __tmp.remaining(),
11694            )
11695        }
11696        __tmp.put_u64_le(self.time_usec);
11697        for val in &self.rpm {
11698            __tmp.put_i32_le(*val);
11699        }
11700        for val in &self.voltage {
11701            __tmp.put_f32_le(*val);
11702        }
11703        for val in &self.current {
11704            __tmp.put_f32_le(*val);
11705        }
11706        __tmp.put_u8(self.index);
11707        if matches!(version, MavlinkVersion::V2) {
11708            let len = __tmp.len();
11709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11710        } else {
11711            __tmp.len()
11712        }
11713    }
11714}
11715#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11716#[doc = ""]
11717#[doc = "ID: 230"]
11718#[derive(Debug, Clone, PartialEq)]
11719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11721#[cfg_attr(feature = "ts", derive(TS))]
11722#[cfg_attr(feature = "ts", ts(export))]
11723pub struct ESTIMATOR_STATUS_DATA {
11724    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11725    pub time_usec: u64,
11726    #[doc = "Velocity innovation test ratio"]
11727    pub vel_ratio: f32,
11728    #[doc = "Horizontal position innovation test ratio"]
11729    pub pos_horiz_ratio: f32,
11730    #[doc = "Vertical position innovation test ratio"]
11731    pub pos_vert_ratio: f32,
11732    #[doc = "Magnetometer innovation test ratio"]
11733    pub mag_ratio: f32,
11734    #[doc = "Height above terrain innovation test ratio"]
11735    pub hagl_ratio: f32,
11736    #[doc = "True airspeed innovation test ratio"]
11737    pub tas_ratio: f32,
11738    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11739    pub pos_horiz_accuracy: f32,
11740    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11741    pub pos_vert_accuracy: f32,
11742    #[doc = "Bitmap indicating which EKF outputs are valid."]
11743    pub flags: EstimatorStatusFlags,
11744}
11745impl ESTIMATOR_STATUS_DATA {
11746    pub const ENCODED_LEN: usize = 42usize;
11747    pub const DEFAULT: Self = Self {
11748        time_usec: 0_u64,
11749        vel_ratio: 0.0_f32,
11750        pos_horiz_ratio: 0.0_f32,
11751        pos_vert_ratio: 0.0_f32,
11752        mag_ratio: 0.0_f32,
11753        hagl_ratio: 0.0_f32,
11754        tas_ratio: 0.0_f32,
11755        pos_horiz_accuracy: 0.0_f32,
11756        pos_vert_accuracy: 0.0_f32,
11757        flags: EstimatorStatusFlags::DEFAULT,
11758    };
11759    #[cfg(feature = "arbitrary")]
11760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11761        use arbitrary::{Arbitrary, Unstructured};
11762        let mut buf = [0u8; 1024];
11763        rng.fill_bytes(&mut buf);
11764        let mut unstructured = Unstructured::new(&buf);
11765        Self::arbitrary(&mut unstructured).unwrap_or_default()
11766    }
11767}
11768impl Default for ESTIMATOR_STATUS_DATA {
11769    fn default() -> Self {
11770        Self::DEFAULT.clone()
11771    }
11772}
11773impl MessageData for ESTIMATOR_STATUS_DATA {
11774    type Message = MavMessage;
11775    const ID: u32 = 230u32;
11776    const NAME: &'static str = "ESTIMATOR_STATUS";
11777    const EXTRA_CRC: u8 = 163u8;
11778    const ENCODED_LEN: usize = 42usize;
11779    fn deser(
11780        _version: MavlinkVersion,
11781        __input: &[u8],
11782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11783        let avail_len = __input.len();
11784        let mut payload_buf = [0; Self::ENCODED_LEN];
11785        let mut buf = if avail_len < Self::ENCODED_LEN {
11786            payload_buf[0..avail_len].copy_from_slice(__input);
11787            Bytes::new(&payload_buf)
11788        } else {
11789            Bytes::new(__input)
11790        };
11791        let mut __struct = Self::default();
11792        __struct.time_usec = buf.get_u64_le()?;
11793        __struct.vel_ratio = buf.get_f32_le()?;
11794        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11795        __struct.pos_vert_ratio = buf.get_f32_le()?;
11796        __struct.mag_ratio = buf.get_f32_le()?;
11797        __struct.hagl_ratio = buf.get_f32_le()?;
11798        __struct.tas_ratio = buf.get_f32_le()?;
11799        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11800        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11801        let tmp = buf.get_u16_le()?;
11802        __struct.flags = EstimatorStatusFlags::from_bits(
11803            tmp as <EstimatorStatusFlags as Flags>::Bits,
11804        )
11805        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11806            flag_type: "EstimatorStatusFlags",
11807            value: tmp as u64,
11808        })?;
11809        Ok(__struct)
11810    }
11811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11812        let mut __tmp = BytesMut::new(bytes);
11813        #[allow(clippy::absurd_extreme_comparisons)]
11814        #[allow(unused_comparisons)]
11815        if __tmp.remaining() < Self::ENCODED_LEN {
11816            panic!(
11817                "buffer is too small (need {} bytes, but got {})",
11818                Self::ENCODED_LEN,
11819                __tmp.remaining(),
11820            )
11821        }
11822        __tmp.put_u64_le(self.time_usec);
11823        __tmp.put_f32_le(self.vel_ratio);
11824        __tmp.put_f32_le(self.pos_horiz_ratio);
11825        __tmp.put_f32_le(self.pos_vert_ratio);
11826        __tmp.put_f32_le(self.mag_ratio);
11827        __tmp.put_f32_le(self.hagl_ratio);
11828        __tmp.put_f32_le(self.tas_ratio);
11829        __tmp.put_f32_le(self.pos_horiz_accuracy);
11830        __tmp.put_f32_le(self.pos_vert_accuracy);
11831        __tmp.put_u16_le(self.flags.bits() as u16);
11832        if matches!(version, MavlinkVersion::V2) {
11833            let len = __tmp.len();
11834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11835        } else {
11836            __tmp.len()
11837        }
11838    }
11839}
11840#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11841#[doc = ""]
11842#[doc = "ID: 410"]
11843#[derive(Debug, Clone, PartialEq)]
11844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11846#[cfg_attr(feature = "ts", derive(TS))]
11847#[cfg_attr(feature = "ts", ts(export))]
11848pub struct EVENT_DATA {
11849    #[doc = "Event ID (as defined in the component metadata)"]
11850    pub id: u32,
11851    #[doc = "Timestamp (time since system boot when the event happened)."]
11852    pub event_time_boot_ms: u32,
11853    #[doc = "Sequence number."]
11854    pub sequence: u16,
11855    #[doc = "Component ID"]
11856    pub destination_component: u8,
11857    #[doc = "System ID"]
11858    pub destination_system: u8,
11859    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11860    pub log_levels: u8,
11861    #[doc = "Arguments (depend on event ID)."]
11862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11864    pub arguments: [u8; 40],
11865}
11866impl EVENT_DATA {
11867    pub const ENCODED_LEN: usize = 53usize;
11868    pub const DEFAULT: Self = Self {
11869        id: 0_u32,
11870        event_time_boot_ms: 0_u32,
11871        sequence: 0_u16,
11872        destination_component: 0_u8,
11873        destination_system: 0_u8,
11874        log_levels: 0_u8,
11875        arguments: [0_u8; 40usize],
11876    };
11877    #[cfg(feature = "arbitrary")]
11878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11879        use arbitrary::{Arbitrary, Unstructured};
11880        let mut buf = [0u8; 1024];
11881        rng.fill_bytes(&mut buf);
11882        let mut unstructured = Unstructured::new(&buf);
11883        Self::arbitrary(&mut unstructured).unwrap_or_default()
11884    }
11885}
11886impl Default for EVENT_DATA {
11887    fn default() -> Self {
11888        Self::DEFAULT.clone()
11889    }
11890}
11891impl MessageData for EVENT_DATA {
11892    type Message = MavMessage;
11893    const ID: u32 = 410u32;
11894    const NAME: &'static str = "EVENT";
11895    const EXTRA_CRC: u8 = 160u8;
11896    const ENCODED_LEN: usize = 53usize;
11897    fn deser(
11898        _version: MavlinkVersion,
11899        __input: &[u8],
11900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11901        let avail_len = __input.len();
11902        let mut payload_buf = [0; Self::ENCODED_LEN];
11903        let mut buf = if avail_len < Self::ENCODED_LEN {
11904            payload_buf[0..avail_len].copy_from_slice(__input);
11905            Bytes::new(&payload_buf)
11906        } else {
11907            Bytes::new(__input)
11908        };
11909        let mut __struct = Self::default();
11910        __struct.id = buf.get_u32_le()?;
11911        __struct.event_time_boot_ms = buf.get_u32_le()?;
11912        __struct.sequence = buf.get_u16_le()?;
11913        __struct.destination_component = buf.get_u8()?;
11914        __struct.destination_system = buf.get_u8()?;
11915        __struct.log_levels = buf.get_u8()?;
11916        for v in &mut __struct.arguments {
11917            let val = buf.get_u8()?;
11918            *v = val;
11919        }
11920        Ok(__struct)
11921    }
11922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11923        let mut __tmp = BytesMut::new(bytes);
11924        #[allow(clippy::absurd_extreme_comparisons)]
11925        #[allow(unused_comparisons)]
11926        if __tmp.remaining() < Self::ENCODED_LEN {
11927            panic!(
11928                "buffer is too small (need {} bytes, but got {})",
11929                Self::ENCODED_LEN,
11930                __tmp.remaining(),
11931            )
11932        }
11933        __tmp.put_u32_le(self.id);
11934        __tmp.put_u32_le(self.event_time_boot_ms);
11935        __tmp.put_u16_le(self.sequence);
11936        __tmp.put_u8(self.destination_component);
11937        __tmp.put_u8(self.destination_system);
11938        __tmp.put_u8(self.log_levels);
11939        for val in &self.arguments {
11940            __tmp.put_u8(*val);
11941        }
11942        if matches!(version, MavlinkVersion::V2) {
11943            let len = __tmp.len();
11944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11945        } else {
11946            __tmp.len()
11947        }
11948    }
11949}
11950#[doc = "Provides state for additional features."]
11951#[doc = ""]
11952#[doc = "ID: 245"]
11953#[derive(Debug, Clone, PartialEq)]
11954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11956#[cfg_attr(feature = "ts", derive(TS))]
11957#[cfg_attr(feature = "ts", ts(export))]
11958pub struct EXTENDED_SYS_STATE_DATA {
11959    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11960    pub vtol_state: MavVtolState,
11961    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11962    pub landed_state: MavLandedState,
11963}
11964impl EXTENDED_SYS_STATE_DATA {
11965    pub const ENCODED_LEN: usize = 2usize;
11966    pub const DEFAULT: Self = Self {
11967        vtol_state: MavVtolState::DEFAULT,
11968        landed_state: MavLandedState::DEFAULT,
11969    };
11970    #[cfg(feature = "arbitrary")]
11971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11972        use arbitrary::{Arbitrary, Unstructured};
11973        let mut buf = [0u8; 1024];
11974        rng.fill_bytes(&mut buf);
11975        let mut unstructured = Unstructured::new(&buf);
11976        Self::arbitrary(&mut unstructured).unwrap_or_default()
11977    }
11978}
11979impl Default for EXTENDED_SYS_STATE_DATA {
11980    fn default() -> Self {
11981        Self::DEFAULT.clone()
11982    }
11983}
11984impl MessageData for EXTENDED_SYS_STATE_DATA {
11985    type Message = MavMessage;
11986    const ID: u32 = 245u32;
11987    const NAME: &'static str = "EXTENDED_SYS_STATE";
11988    const EXTRA_CRC: u8 = 130u8;
11989    const ENCODED_LEN: usize = 2usize;
11990    fn deser(
11991        _version: MavlinkVersion,
11992        __input: &[u8],
11993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11994        let avail_len = __input.len();
11995        let mut payload_buf = [0; Self::ENCODED_LEN];
11996        let mut buf = if avail_len < Self::ENCODED_LEN {
11997            payload_buf[0..avail_len].copy_from_slice(__input);
11998            Bytes::new(&payload_buf)
11999        } else {
12000            Bytes::new(__input)
12001        };
12002        let mut __struct = Self::default();
12003        let tmp = buf.get_u8()?;
12004        __struct.vtol_state =
12005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12006                enum_type: "MavVtolState",
12007                value: tmp as u64,
12008            })?;
12009        let tmp = buf.get_u8()?;
12010        __struct.landed_state =
12011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12012                enum_type: "MavLandedState",
12013                value: tmp as u64,
12014            })?;
12015        Ok(__struct)
12016    }
12017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12018        let mut __tmp = BytesMut::new(bytes);
12019        #[allow(clippy::absurd_extreme_comparisons)]
12020        #[allow(unused_comparisons)]
12021        if __tmp.remaining() < Self::ENCODED_LEN {
12022            panic!(
12023                "buffer is too small (need {} bytes, but got {})",
12024                Self::ENCODED_LEN,
12025                __tmp.remaining(),
12026            )
12027        }
12028        __tmp.put_u8(self.vtol_state as u8);
12029        __tmp.put_u8(self.landed_state as u8);
12030        if matches!(version, MavlinkVersion::V2) {
12031            let len = __tmp.len();
12032            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12033        } else {
12034            __tmp.len()
12035        }
12036    }
12037}
12038#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12039#[doc = ""]
12040#[doc = "ID: 162"]
12041#[derive(Debug, Clone, PartialEq)]
12042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12044#[cfg_attr(feature = "ts", derive(TS))]
12045#[cfg_attr(feature = "ts", ts(export))]
12046pub struct FENCE_STATUS_DATA {
12047    #[doc = "Time (since boot) of last breach."]
12048    pub breach_time: u32,
12049    #[doc = "Number of fence breaches."]
12050    pub breach_count: u16,
12051    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12052    pub breach_status: u8,
12053    #[doc = "Last breach type."]
12054    pub breach_type: FenceBreach,
12055    #[doc = "Active action to prevent fence breach"]
12056    #[cfg_attr(feature = "serde", serde(default))]
12057    pub breach_mitigation: FenceMitigate,
12058}
12059impl FENCE_STATUS_DATA {
12060    pub const ENCODED_LEN: usize = 9usize;
12061    pub const DEFAULT: Self = Self {
12062        breach_time: 0_u32,
12063        breach_count: 0_u16,
12064        breach_status: 0_u8,
12065        breach_type: FenceBreach::DEFAULT,
12066        breach_mitigation: FenceMitigate::DEFAULT,
12067    };
12068    #[cfg(feature = "arbitrary")]
12069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12070        use arbitrary::{Arbitrary, Unstructured};
12071        let mut buf = [0u8; 1024];
12072        rng.fill_bytes(&mut buf);
12073        let mut unstructured = Unstructured::new(&buf);
12074        Self::arbitrary(&mut unstructured).unwrap_or_default()
12075    }
12076}
12077impl Default for FENCE_STATUS_DATA {
12078    fn default() -> Self {
12079        Self::DEFAULT.clone()
12080    }
12081}
12082impl MessageData for FENCE_STATUS_DATA {
12083    type Message = MavMessage;
12084    const ID: u32 = 162u32;
12085    const NAME: &'static str = "FENCE_STATUS";
12086    const EXTRA_CRC: u8 = 189u8;
12087    const ENCODED_LEN: usize = 9usize;
12088    fn deser(
12089        _version: MavlinkVersion,
12090        __input: &[u8],
12091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12092        let avail_len = __input.len();
12093        let mut payload_buf = [0; Self::ENCODED_LEN];
12094        let mut buf = if avail_len < Self::ENCODED_LEN {
12095            payload_buf[0..avail_len].copy_from_slice(__input);
12096            Bytes::new(&payload_buf)
12097        } else {
12098            Bytes::new(__input)
12099        };
12100        let mut __struct = Self::default();
12101        __struct.breach_time = buf.get_u32_le()?;
12102        __struct.breach_count = buf.get_u16_le()?;
12103        __struct.breach_status = buf.get_u8()?;
12104        let tmp = buf.get_u8()?;
12105        __struct.breach_type =
12106            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12107                enum_type: "FenceBreach",
12108                value: tmp as u64,
12109            })?;
12110        let tmp = buf.get_u8()?;
12111        __struct.breach_mitigation =
12112            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12113                enum_type: "FenceMitigate",
12114                value: tmp as u64,
12115            })?;
12116        Ok(__struct)
12117    }
12118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12119        let mut __tmp = BytesMut::new(bytes);
12120        #[allow(clippy::absurd_extreme_comparisons)]
12121        #[allow(unused_comparisons)]
12122        if __tmp.remaining() < Self::ENCODED_LEN {
12123            panic!(
12124                "buffer is too small (need {} bytes, but got {})",
12125                Self::ENCODED_LEN,
12126                __tmp.remaining(),
12127            )
12128        }
12129        __tmp.put_u32_le(self.breach_time);
12130        __tmp.put_u16_le(self.breach_count);
12131        __tmp.put_u8(self.breach_status);
12132        __tmp.put_u8(self.breach_type as u8);
12133        if matches!(version, MavlinkVersion::V2) {
12134            __tmp.put_u8(self.breach_mitigation as u8);
12135            let len = __tmp.len();
12136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12137        } else {
12138            __tmp.len()
12139        }
12140    }
12141}
12142#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12143#[doc = ""]
12144#[doc = "ID: 110"]
12145#[derive(Debug, Clone, PartialEq)]
12146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12148#[cfg_attr(feature = "ts", derive(TS))]
12149#[cfg_attr(feature = "ts", ts(export))]
12150pub struct FILE_TRANSFER_PROTOCOL_DATA {
12151    #[doc = "Network ID (0 for broadcast)"]
12152    pub target_network: u8,
12153    #[doc = "System ID (0 for broadcast)"]
12154    pub target_system: u8,
12155    #[doc = "Component ID (0 for broadcast)"]
12156    pub target_component: u8,
12157    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12159    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12160    pub payload: [u8; 251],
12161}
12162impl FILE_TRANSFER_PROTOCOL_DATA {
12163    pub const ENCODED_LEN: usize = 254usize;
12164    pub const DEFAULT: Self = Self {
12165        target_network: 0_u8,
12166        target_system: 0_u8,
12167        target_component: 0_u8,
12168        payload: [0_u8; 251usize],
12169    };
12170    #[cfg(feature = "arbitrary")]
12171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12172        use arbitrary::{Arbitrary, Unstructured};
12173        let mut buf = [0u8; 1024];
12174        rng.fill_bytes(&mut buf);
12175        let mut unstructured = Unstructured::new(&buf);
12176        Self::arbitrary(&mut unstructured).unwrap_or_default()
12177    }
12178}
12179impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12180    fn default() -> Self {
12181        Self::DEFAULT.clone()
12182    }
12183}
12184impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12185    type Message = MavMessage;
12186    const ID: u32 = 110u32;
12187    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12188    const EXTRA_CRC: u8 = 84u8;
12189    const ENCODED_LEN: usize = 254usize;
12190    fn deser(
12191        _version: MavlinkVersion,
12192        __input: &[u8],
12193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12194        let avail_len = __input.len();
12195        let mut payload_buf = [0; Self::ENCODED_LEN];
12196        let mut buf = if avail_len < Self::ENCODED_LEN {
12197            payload_buf[0..avail_len].copy_from_slice(__input);
12198            Bytes::new(&payload_buf)
12199        } else {
12200            Bytes::new(__input)
12201        };
12202        let mut __struct = Self::default();
12203        __struct.target_network = buf.get_u8()?;
12204        __struct.target_system = buf.get_u8()?;
12205        __struct.target_component = buf.get_u8()?;
12206        for v in &mut __struct.payload {
12207            let val = buf.get_u8()?;
12208            *v = val;
12209        }
12210        Ok(__struct)
12211    }
12212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12213        let mut __tmp = BytesMut::new(bytes);
12214        #[allow(clippy::absurd_extreme_comparisons)]
12215        #[allow(unused_comparisons)]
12216        if __tmp.remaining() < Self::ENCODED_LEN {
12217            panic!(
12218                "buffer is too small (need {} bytes, but got {})",
12219                Self::ENCODED_LEN,
12220                __tmp.remaining(),
12221            )
12222        }
12223        __tmp.put_u8(self.target_network);
12224        __tmp.put_u8(self.target_system);
12225        __tmp.put_u8(self.target_component);
12226        for val in &self.payload {
12227            __tmp.put_u8(*val);
12228        }
12229        if matches!(version, MavlinkVersion::V2) {
12230            let len = __tmp.len();
12231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12232        } else {
12233            __tmp.len()
12234        }
12235    }
12236}
12237#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12238#[doc = ""]
12239#[doc = "ID: 264"]
12240#[derive(Debug, Clone, PartialEq)]
12241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12243#[cfg_attr(feature = "ts", derive(TS))]
12244#[cfg_attr(feature = "ts", ts(export))]
12245pub struct FLIGHT_INFORMATION_DATA {
12246    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12247    pub arming_time_utc: u64,
12248    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12249    pub takeoff_time_utc: u64,
12250    #[doc = "Flight number. Note, field is misnamed UUID."]
12251    pub flight_uuid: u64,
12252    #[doc = "Timestamp (time since system boot)."]
12253    pub time_boot_ms: u32,
12254    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12255    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12256    pub landing_time: u32,
12257}
12258impl FLIGHT_INFORMATION_DATA {
12259    pub const ENCODED_LEN: usize = 32usize;
12260    pub const DEFAULT: Self = Self {
12261        arming_time_utc: 0_u64,
12262        takeoff_time_utc: 0_u64,
12263        flight_uuid: 0_u64,
12264        time_boot_ms: 0_u32,
12265        landing_time: 0_u32,
12266    };
12267    #[cfg(feature = "arbitrary")]
12268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12269        use arbitrary::{Arbitrary, Unstructured};
12270        let mut buf = [0u8; 1024];
12271        rng.fill_bytes(&mut buf);
12272        let mut unstructured = Unstructured::new(&buf);
12273        Self::arbitrary(&mut unstructured).unwrap_or_default()
12274    }
12275}
12276impl Default for FLIGHT_INFORMATION_DATA {
12277    fn default() -> Self {
12278        Self::DEFAULT.clone()
12279    }
12280}
12281impl MessageData for FLIGHT_INFORMATION_DATA {
12282    type Message = MavMessage;
12283    const ID: u32 = 264u32;
12284    const NAME: &'static str = "FLIGHT_INFORMATION";
12285    const EXTRA_CRC: u8 = 49u8;
12286    const ENCODED_LEN: usize = 32usize;
12287    fn deser(
12288        _version: MavlinkVersion,
12289        __input: &[u8],
12290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12291        let avail_len = __input.len();
12292        let mut payload_buf = [0; Self::ENCODED_LEN];
12293        let mut buf = if avail_len < Self::ENCODED_LEN {
12294            payload_buf[0..avail_len].copy_from_slice(__input);
12295            Bytes::new(&payload_buf)
12296        } else {
12297            Bytes::new(__input)
12298        };
12299        let mut __struct = Self::default();
12300        __struct.arming_time_utc = buf.get_u64_le()?;
12301        __struct.takeoff_time_utc = buf.get_u64_le()?;
12302        __struct.flight_uuid = buf.get_u64_le()?;
12303        __struct.time_boot_ms = buf.get_u32_le()?;
12304        __struct.landing_time = buf.get_u32_le()?;
12305        Ok(__struct)
12306    }
12307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12308        let mut __tmp = BytesMut::new(bytes);
12309        #[allow(clippy::absurd_extreme_comparisons)]
12310        #[allow(unused_comparisons)]
12311        if __tmp.remaining() < Self::ENCODED_LEN {
12312            panic!(
12313                "buffer is too small (need {} bytes, but got {})",
12314                Self::ENCODED_LEN,
12315                __tmp.remaining(),
12316            )
12317        }
12318        __tmp.put_u64_le(self.arming_time_utc);
12319        __tmp.put_u64_le(self.takeoff_time_utc);
12320        __tmp.put_u64_le(self.flight_uuid);
12321        __tmp.put_u32_le(self.time_boot_ms);
12322        if matches!(version, MavlinkVersion::V2) {
12323            __tmp.put_u32_le(self.landing_time);
12324            let len = __tmp.len();
12325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12326        } else {
12327            __tmp.len()
12328        }
12329    }
12330}
12331#[doc = "Current motion information from a designated system."]
12332#[doc = ""]
12333#[doc = "ID: 144"]
12334#[derive(Debug, Clone, PartialEq)]
12335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12337#[cfg_attr(feature = "ts", derive(TS))]
12338#[cfg_attr(feature = "ts", ts(export))]
12339pub struct FOLLOW_TARGET_DATA {
12340    #[doc = "Timestamp (time since system boot)."]
12341    pub timestamp: u64,
12342    #[doc = "button states or switches of a tracker device"]
12343    pub custom_state: u64,
12344    #[doc = "Latitude (WGS84)"]
12345    pub lat: i32,
12346    #[doc = "Longitude (WGS84)"]
12347    pub lon: i32,
12348    #[doc = "Altitude (MSL)"]
12349    pub alt: f32,
12350    #[doc = "target velocity (0,0,0) for unknown"]
12351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12352    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12353    pub vel: [f32; 3],
12354    #[doc = "linear target acceleration (0,0,0) for unknown"]
12355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12356    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12357    pub acc: [f32; 3],
12358    #[doc = "(0 0 0 0 for unknown)"]
12359    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12360    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12361    pub attitude_q: [f32; 4],
12362    #[doc = "(0 0 0 for unknown)"]
12363    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12364    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12365    pub rates: [f32; 3],
12366    #[doc = "eph epv"]
12367    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12368    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12369    pub position_cov: [f32; 3],
12370    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12371    pub est_capabilities: u8,
12372}
12373impl FOLLOW_TARGET_DATA {
12374    pub const ENCODED_LEN: usize = 93usize;
12375    pub const DEFAULT: Self = Self {
12376        timestamp: 0_u64,
12377        custom_state: 0_u64,
12378        lat: 0_i32,
12379        lon: 0_i32,
12380        alt: 0.0_f32,
12381        vel: [0.0_f32; 3usize],
12382        acc: [0.0_f32; 3usize],
12383        attitude_q: [0.0_f32; 4usize],
12384        rates: [0.0_f32; 3usize],
12385        position_cov: [0.0_f32; 3usize],
12386        est_capabilities: 0_u8,
12387    };
12388    #[cfg(feature = "arbitrary")]
12389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12390        use arbitrary::{Arbitrary, Unstructured};
12391        let mut buf = [0u8; 1024];
12392        rng.fill_bytes(&mut buf);
12393        let mut unstructured = Unstructured::new(&buf);
12394        Self::arbitrary(&mut unstructured).unwrap_or_default()
12395    }
12396}
12397impl Default for FOLLOW_TARGET_DATA {
12398    fn default() -> Self {
12399        Self::DEFAULT.clone()
12400    }
12401}
12402impl MessageData for FOLLOW_TARGET_DATA {
12403    type Message = MavMessage;
12404    const ID: u32 = 144u32;
12405    const NAME: &'static str = "FOLLOW_TARGET";
12406    const EXTRA_CRC: u8 = 127u8;
12407    const ENCODED_LEN: usize = 93usize;
12408    fn deser(
12409        _version: MavlinkVersion,
12410        __input: &[u8],
12411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12412        let avail_len = __input.len();
12413        let mut payload_buf = [0; Self::ENCODED_LEN];
12414        let mut buf = if avail_len < Self::ENCODED_LEN {
12415            payload_buf[0..avail_len].copy_from_slice(__input);
12416            Bytes::new(&payload_buf)
12417        } else {
12418            Bytes::new(__input)
12419        };
12420        let mut __struct = Self::default();
12421        __struct.timestamp = buf.get_u64_le()?;
12422        __struct.custom_state = buf.get_u64_le()?;
12423        __struct.lat = buf.get_i32_le()?;
12424        __struct.lon = buf.get_i32_le()?;
12425        __struct.alt = buf.get_f32_le()?;
12426        for v in &mut __struct.vel {
12427            let val = buf.get_f32_le()?;
12428            *v = val;
12429        }
12430        for v in &mut __struct.acc {
12431            let val = buf.get_f32_le()?;
12432            *v = val;
12433        }
12434        for v in &mut __struct.attitude_q {
12435            let val = buf.get_f32_le()?;
12436            *v = val;
12437        }
12438        for v in &mut __struct.rates {
12439            let val = buf.get_f32_le()?;
12440            *v = val;
12441        }
12442        for v in &mut __struct.position_cov {
12443            let val = buf.get_f32_le()?;
12444            *v = val;
12445        }
12446        __struct.est_capabilities = buf.get_u8()?;
12447        Ok(__struct)
12448    }
12449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12450        let mut __tmp = BytesMut::new(bytes);
12451        #[allow(clippy::absurd_extreme_comparisons)]
12452        #[allow(unused_comparisons)]
12453        if __tmp.remaining() < Self::ENCODED_LEN {
12454            panic!(
12455                "buffer is too small (need {} bytes, but got {})",
12456                Self::ENCODED_LEN,
12457                __tmp.remaining(),
12458            )
12459        }
12460        __tmp.put_u64_le(self.timestamp);
12461        __tmp.put_u64_le(self.custom_state);
12462        __tmp.put_i32_le(self.lat);
12463        __tmp.put_i32_le(self.lon);
12464        __tmp.put_f32_le(self.alt);
12465        for val in &self.vel {
12466            __tmp.put_f32_le(*val);
12467        }
12468        for val in &self.acc {
12469            __tmp.put_f32_le(*val);
12470        }
12471        for val in &self.attitude_q {
12472            __tmp.put_f32_le(*val);
12473        }
12474        for val in &self.rates {
12475            __tmp.put_f32_le(*val);
12476        }
12477        for val in &self.position_cov {
12478            __tmp.put_f32_le(*val);
12479        }
12480        __tmp.put_u8(self.est_capabilities);
12481        if matches!(version, MavlinkVersion::V2) {
12482            let len = __tmp.len();
12483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12484        } else {
12485            __tmp.len()
12486        }
12487    }
12488}
12489#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12490#[doc = ""]
12491#[doc = "ID: 371"]
12492#[derive(Debug, Clone, PartialEq)]
12493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12495#[cfg_attr(feature = "ts", derive(TS))]
12496#[cfg_attr(feature = "ts", ts(export))]
12497pub struct FUEL_STATUS_DATA {
12498    #[doc = "Capacity when full. Must be provided."]
12499    pub maximum_fuel: f32,
12500    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12501    pub consumed_fuel: f32,
12502    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12503    pub remaining_fuel: f32,
12504    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12505    pub flow_rate: f32,
12506    #[doc = "Fuel temperature. NaN: field not provided."]
12507    pub temperature: f32,
12508    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12509    pub fuel_type: MavFuelType,
12510    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12511    pub id: u8,
12512    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12513    pub percent_remaining: u8,
12514}
12515impl FUEL_STATUS_DATA {
12516    pub const ENCODED_LEN: usize = 26usize;
12517    pub const DEFAULT: Self = Self {
12518        maximum_fuel: 0.0_f32,
12519        consumed_fuel: 0.0_f32,
12520        remaining_fuel: 0.0_f32,
12521        flow_rate: 0.0_f32,
12522        temperature: 0.0_f32,
12523        fuel_type: MavFuelType::DEFAULT,
12524        id: 0_u8,
12525        percent_remaining: 0_u8,
12526    };
12527    #[cfg(feature = "arbitrary")]
12528    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12529        use arbitrary::{Arbitrary, Unstructured};
12530        let mut buf = [0u8; 1024];
12531        rng.fill_bytes(&mut buf);
12532        let mut unstructured = Unstructured::new(&buf);
12533        Self::arbitrary(&mut unstructured).unwrap_or_default()
12534    }
12535}
12536impl Default for FUEL_STATUS_DATA {
12537    fn default() -> Self {
12538        Self::DEFAULT.clone()
12539    }
12540}
12541impl MessageData for FUEL_STATUS_DATA {
12542    type Message = MavMessage;
12543    const ID: u32 = 371u32;
12544    const NAME: &'static str = "FUEL_STATUS";
12545    const EXTRA_CRC: u8 = 10u8;
12546    const ENCODED_LEN: usize = 26usize;
12547    fn deser(
12548        _version: MavlinkVersion,
12549        __input: &[u8],
12550    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12551        let avail_len = __input.len();
12552        let mut payload_buf = [0; Self::ENCODED_LEN];
12553        let mut buf = if avail_len < Self::ENCODED_LEN {
12554            payload_buf[0..avail_len].copy_from_slice(__input);
12555            Bytes::new(&payload_buf)
12556        } else {
12557            Bytes::new(__input)
12558        };
12559        let mut __struct = Self::default();
12560        __struct.maximum_fuel = buf.get_f32_le()?;
12561        __struct.consumed_fuel = buf.get_f32_le()?;
12562        __struct.remaining_fuel = buf.get_f32_le()?;
12563        __struct.flow_rate = buf.get_f32_le()?;
12564        __struct.temperature = buf.get_f32_le()?;
12565        let tmp = buf.get_u32_le()?;
12566        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12567            ::mavlink_core::error::ParserError::InvalidEnum {
12568                enum_type: "MavFuelType",
12569                value: tmp as u64,
12570            },
12571        )?;
12572        __struct.id = buf.get_u8()?;
12573        __struct.percent_remaining = buf.get_u8()?;
12574        Ok(__struct)
12575    }
12576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12577        let mut __tmp = BytesMut::new(bytes);
12578        #[allow(clippy::absurd_extreme_comparisons)]
12579        #[allow(unused_comparisons)]
12580        if __tmp.remaining() < Self::ENCODED_LEN {
12581            panic!(
12582                "buffer is too small (need {} bytes, but got {})",
12583                Self::ENCODED_LEN,
12584                __tmp.remaining(),
12585            )
12586        }
12587        __tmp.put_f32_le(self.maximum_fuel);
12588        __tmp.put_f32_le(self.consumed_fuel);
12589        __tmp.put_f32_le(self.remaining_fuel);
12590        __tmp.put_f32_le(self.flow_rate);
12591        __tmp.put_f32_le(self.temperature);
12592        __tmp.put_u32_le(self.fuel_type as u32);
12593        __tmp.put_u8(self.id);
12594        __tmp.put_u8(self.percent_remaining);
12595        if matches!(version, MavlinkVersion::V2) {
12596            let len = __tmp.len();
12597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12598        } else {
12599            __tmp.len()
12600        }
12601    }
12602}
12603#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12604#[doc = ""]
12605#[doc = "ID: 373"]
12606#[derive(Debug, Clone, PartialEq)]
12607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12609#[cfg_attr(feature = "ts", derive(TS))]
12610#[cfg_attr(feature = "ts", ts(export))]
12611pub struct GENERATOR_STATUS_DATA {
12612    #[doc = "Status flags."]
12613    pub status: MavGeneratorStatusFlag,
12614    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12615    pub battery_current: f32,
12616    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12617    pub load_current: f32,
12618    #[doc = "The power being generated. NaN: field not provided"]
12619    pub power_generated: f32,
12620    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12621    pub bus_voltage: f32,
12622    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12623    pub bat_current_setpoint: f32,
12624    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12625    pub runtime: u32,
12626    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12627    pub time_until_maintenance: i32,
12628    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12629    pub generator_speed: u16,
12630    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12631    pub rectifier_temperature: i16,
12632    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12633    pub generator_temperature: i16,
12634}
12635impl GENERATOR_STATUS_DATA {
12636    pub const ENCODED_LEN: usize = 42usize;
12637    pub const DEFAULT: Self = Self {
12638        status: MavGeneratorStatusFlag::DEFAULT,
12639        battery_current: 0.0_f32,
12640        load_current: 0.0_f32,
12641        power_generated: 0.0_f32,
12642        bus_voltage: 0.0_f32,
12643        bat_current_setpoint: 0.0_f32,
12644        runtime: 0_u32,
12645        time_until_maintenance: 0_i32,
12646        generator_speed: 0_u16,
12647        rectifier_temperature: 0_i16,
12648        generator_temperature: 0_i16,
12649    };
12650    #[cfg(feature = "arbitrary")]
12651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12652        use arbitrary::{Arbitrary, Unstructured};
12653        let mut buf = [0u8; 1024];
12654        rng.fill_bytes(&mut buf);
12655        let mut unstructured = Unstructured::new(&buf);
12656        Self::arbitrary(&mut unstructured).unwrap_or_default()
12657    }
12658}
12659impl Default for GENERATOR_STATUS_DATA {
12660    fn default() -> Self {
12661        Self::DEFAULT.clone()
12662    }
12663}
12664impl MessageData for GENERATOR_STATUS_DATA {
12665    type Message = MavMessage;
12666    const ID: u32 = 373u32;
12667    const NAME: &'static str = "GENERATOR_STATUS";
12668    const EXTRA_CRC: u8 = 117u8;
12669    const ENCODED_LEN: usize = 42usize;
12670    fn deser(
12671        _version: MavlinkVersion,
12672        __input: &[u8],
12673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12674        let avail_len = __input.len();
12675        let mut payload_buf = [0; Self::ENCODED_LEN];
12676        let mut buf = if avail_len < Self::ENCODED_LEN {
12677            payload_buf[0..avail_len].copy_from_slice(__input);
12678            Bytes::new(&payload_buf)
12679        } else {
12680            Bytes::new(__input)
12681        };
12682        let mut __struct = Self::default();
12683        let tmp = buf.get_u64_le()?;
12684        __struct.status =
12685            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12686                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12687                    flag_type: "MavGeneratorStatusFlag",
12688                    value: tmp as u64,
12689                })?;
12690        __struct.battery_current = buf.get_f32_le()?;
12691        __struct.load_current = buf.get_f32_le()?;
12692        __struct.power_generated = buf.get_f32_le()?;
12693        __struct.bus_voltage = buf.get_f32_le()?;
12694        __struct.bat_current_setpoint = buf.get_f32_le()?;
12695        __struct.runtime = buf.get_u32_le()?;
12696        __struct.time_until_maintenance = buf.get_i32_le()?;
12697        __struct.generator_speed = buf.get_u16_le()?;
12698        __struct.rectifier_temperature = buf.get_i16_le()?;
12699        __struct.generator_temperature = buf.get_i16_le()?;
12700        Ok(__struct)
12701    }
12702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12703        let mut __tmp = BytesMut::new(bytes);
12704        #[allow(clippy::absurd_extreme_comparisons)]
12705        #[allow(unused_comparisons)]
12706        if __tmp.remaining() < Self::ENCODED_LEN {
12707            panic!(
12708                "buffer is too small (need {} bytes, but got {})",
12709                Self::ENCODED_LEN,
12710                __tmp.remaining(),
12711            )
12712        }
12713        __tmp.put_u64_le(self.status.bits() as u64);
12714        __tmp.put_f32_le(self.battery_current);
12715        __tmp.put_f32_le(self.load_current);
12716        __tmp.put_f32_le(self.power_generated);
12717        __tmp.put_f32_le(self.bus_voltage);
12718        __tmp.put_f32_le(self.bat_current_setpoint);
12719        __tmp.put_u32_le(self.runtime);
12720        __tmp.put_i32_le(self.time_until_maintenance);
12721        __tmp.put_u16_le(self.generator_speed);
12722        __tmp.put_i16_le(self.rectifier_temperature);
12723        __tmp.put_i16_le(self.generator_temperature);
12724        if matches!(version, MavlinkVersion::V2) {
12725            let len = __tmp.len();
12726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12727        } else {
12728            __tmp.len()
12729        }
12730    }
12731}
12732#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12733#[doc = ""]
12734#[doc = "ID: 285"]
12735#[derive(Debug, Clone, PartialEq)]
12736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12738#[cfg_attr(feature = "ts", derive(TS))]
12739#[cfg_attr(feature = "ts", ts(export))]
12740pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12741    #[doc = "Timestamp (time since system boot)."]
12742    pub time_boot_ms: u32,
12743    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12746    pub q: [f32; 4],
12747    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12748    pub angular_velocity_x: f32,
12749    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12750    pub angular_velocity_y: f32,
12751    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12752    pub angular_velocity_z: f32,
12753    #[doc = "Failure flags (0 for no failure)"]
12754    pub failure_flags: GimbalDeviceErrorFlags,
12755    #[doc = "Current gimbal flags set."]
12756    pub flags: GimbalDeviceFlags,
12757    #[doc = "System ID"]
12758    pub target_system: u8,
12759    #[doc = "Component ID"]
12760    pub target_component: u8,
12761    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12763    pub delta_yaw: f32,
12764    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12766    pub delta_yaw_velocity: f32,
12767    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12768    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12769    pub gimbal_device_id: u8,
12770}
12771impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12772    pub const ENCODED_LEN: usize = 49usize;
12773    pub const DEFAULT: Self = Self {
12774        time_boot_ms: 0_u32,
12775        q: [0.0_f32; 4usize],
12776        angular_velocity_x: 0.0_f32,
12777        angular_velocity_y: 0.0_f32,
12778        angular_velocity_z: 0.0_f32,
12779        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12780        flags: GimbalDeviceFlags::DEFAULT,
12781        target_system: 0_u8,
12782        target_component: 0_u8,
12783        delta_yaw: 0.0_f32,
12784        delta_yaw_velocity: 0.0_f32,
12785        gimbal_device_id: 0_u8,
12786    };
12787    #[cfg(feature = "arbitrary")]
12788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12789        use arbitrary::{Arbitrary, Unstructured};
12790        let mut buf = [0u8; 1024];
12791        rng.fill_bytes(&mut buf);
12792        let mut unstructured = Unstructured::new(&buf);
12793        Self::arbitrary(&mut unstructured).unwrap_or_default()
12794    }
12795}
12796impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12797    fn default() -> Self {
12798        Self::DEFAULT.clone()
12799    }
12800}
12801impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12802    type Message = MavMessage;
12803    const ID: u32 = 285u32;
12804    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12805    const EXTRA_CRC: u8 = 137u8;
12806    const ENCODED_LEN: usize = 49usize;
12807    fn deser(
12808        _version: MavlinkVersion,
12809        __input: &[u8],
12810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12811        let avail_len = __input.len();
12812        let mut payload_buf = [0; Self::ENCODED_LEN];
12813        let mut buf = if avail_len < Self::ENCODED_LEN {
12814            payload_buf[0..avail_len].copy_from_slice(__input);
12815            Bytes::new(&payload_buf)
12816        } else {
12817            Bytes::new(__input)
12818        };
12819        let mut __struct = Self::default();
12820        __struct.time_boot_ms = buf.get_u32_le()?;
12821        for v in &mut __struct.q {
12822            let val = buf.get_f32_le()?;
12823            *v = val;
12824        }
12825        __struct.angular_velocity_x = buf.get_f32_le()?;
12826        __struct.angular_velocity_y = buf.get_f32_le()?;
12827        __struct.angular_velocity_z = buf.get_f32_le()?;
12828        let tmp = buf.get_u32_le()?;
12829        __struct.failure_flags =
12830            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12831                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12832                    flag_type: "GimbalDeviceErrorFlags",
12833                    value: tmp as u64,
12834                })?;
12835        let tmp = buf.get_u16_le()?;
12836        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12837            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12838                flag_type: "GimbalDeviceFlags",
12839                value: tmp as u64,
12840            })?;
12841        __struct.target_system = buf.get_u8()?;
12842        __struct.target_component = buf.get_u8()?;
12843        __struct.delta_yaw = buf.get_f32_le()?;
12844        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12845        __struct.gimbal_device_id = buf.get_u8()?;
12846        Ok(__struct)
12847    }
12848    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12849        let mut __tmp = BytesMut::new(bytes);
12850        #[allow(clippy::absurd_extreme_comparisons)]
12851        #[allow(unused_comparisons)]
12852        if __tmp.remaining() < Self::ENCODED_LEN {
12853            panic!(
12854                "buffer is too small (need {} bytes, but got {})",
12855                Self::ENCODED_LEN,
12856                __tmp.remaining(),
12857            )
12858        }
12859        __tmp.put_u32_le(self.time_boot_ms);
12860        for val in &self.q {
12861            __tmp.put_f32_le(*val);
12862        }
12863        __tmp.put_f32_le(self.angular_velocity_x);
12864        __tmp.put_f32_le(self.angular_velocity_y);
12865        __tmp.put_f32_le(self.angular_velocity_z);
12866        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12867        __tmp.put_u16_le(self.flags.bits() as u16);
12868        __tmp.put_u8(self.target_system);
12869        __tmp.put_u8(self.target_component);
12870        if matches!(version, MavlinkVersion::V2) {
12871            __tmp.put_f32_le(self.delta_yaw);
12872            __tmp.put_f32_le(self.delta_yaw_velocity);
12873            __tmp.put_u8(self.gimbal_device_id);
12874            let len = __tmp.len();
12875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12876        } else {
12877            __tmp.len()
12878        }
12879    }
12880}
12881#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12882#[doc = ""]
12883#[doc = "ID: 283"]
12884#[derive(Debug, Clone, PartialEq)]
12885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12887#[cfg_attr(feature = "ts", derive(TS))]
12888#[cfg_attr(feature = "ts", ts(export))]
12889pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12890    #[doc = "UID of gimbal hardware (0 if unknown)."]
12891    pub uid: u64,
12892    #[doc = "Timestamp (time since system boot)."]
12893    pub time_boot_ms: u32,
12894    #[doc = "0xff)."]
12895    pub firmware_version: u32,
12896    #[doc = "0xff)."]
12897    pub hardware_version: u32,
12898    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12899    pub roll_min: f32,
12900    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12901    pub roll_max: f32,
12902    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12903    pub pitch_min: f32,
12904    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12905    pub pitch_max: f32,
12906    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12907    pub yaw_min: f32,
12908    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12909    pub yaw_max: f32,
12910    #[doc = "Bitmap of gimbal capability flags."]
12911    pub cap_flags: GimbalDeviceCapFlags,
12912    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12913    pub custom_cap_flags: u16,
12914    #[doc = "Name of the gimbal vendor."]
12915    #[cfg_attr(feature = "ts", ts(type = "string"))]
12916    pub vendor_name: CharArray<32>,
12917    #[doc = "Name of the gimbal model."]
12918    #[cfg_attr(feature = "ts", ts(type = "string"))]
12919    pub model_name: CharArray<32>,
12920    #[doc = "Custom name of the gimbal given to it by the user."]
12921    #[cfg_attr(feature = "ts", ts(type = "string"))]
12922    pub custom_name: CharArray<32>,
12923    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12925    pub gimbal_device_id: u8,
12926}
12927impl GIMBAL_DEVICE_INFORMATION_DATA {
12928    pub const ENCODED_LEN: usize = 145usize;
12929    pub const DEFAULT: Self = Self {
12930        uid: 0_u64,
12931        time_boot_ms: 0_u32,
12932        firmware_version: 0_u32,
12933        hardware_version: 0_u32,
12934        roll_min: 0.0_f32,
12935        roll_max: 0.0_f32,
12936        pitch_min: 0.0_f32,
12937        pitch_max: 0.0_f32,
12938        yaw_min: 0.0_f32,
12939        yaw_max: 0.0_f32,
12940        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12941        custom_cap_flags: 0_u16,
12942        vendor_name: CharArray::new([0_u8; 32usize]),
12943        model_name: CharArray::new([0_u8; 32usize]),
12944        custom_name: CharArray::new([0_u8; 32usize]),
12945        gimbal_device_id: 0_u8,
12946    };
12947    #[cfg(feature = "arbitrary")]
12948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12949        use arbitrary::{Arbitrary, Unstructured};
12950        let mut buf = [0u8; 1024];
12951        rng.fill_bytes(&mut buf);
12952        let mut unstructured = Unstructured::new(&buf);
12953        Self::arbitrary(&mut unstructured).unwrap_or_default()
12954    }
12955}
12956impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12957    fn default() -> Self {
12958        Self::DEFAULT.clone()
12959    }
12960}
12961impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12962    type Message = MavMessage;
12963    const ID: u32 = 283u32;
12964    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12965    const EXTRA_CRC: u8 = 74u8;
12966    const ENCODED_LEN: usize = 145usize;
12967    fn deser(
12968        _version: MavlinkVersion,
12969        __input: &[u8],
12970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12971        let avail_len = __input.len();
12972        let mut payload_buf = [0; Self::ENCODED_LEN];
12973        let mut buf = if avail_len < Self::ENCODED_LEN {
12974            payload_buf[0..avail_len].copy_from_slice(__input);
12975            Bytes::new(&payload_buf)
12976        } else {
12977            Bytes::new(__input)
12978        };
12979        let mut __struct = Self::default();
12980        __struct.uid = buf.get_u64_le()?;
12981        __struct.time_boot_ms = buf.get_u32_le()?;
12982        __struct.firmware_version = buf.get_u32_le()?;
12983        __struct.hardware_version = buf.get_u32_le()?;
12984        __struct.roll_min = buf.get_f32_le()?;
12985        __struct.roll_max = buf.get_f32_le()?;
12986        __struct.pitch_min = buf.get_f32_le()?;
12987        __struct.pitch_max = buf.get_f32_le()?;
12988        __struct.yaw_min = buf.get_f32_le()?;
12989        __struct.yaw_max = buf.get_f32_le()?;
12990        let tmp = buf.get_u16_le()?;
12991        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12992            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12993        )
12994        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12995            flag_type: "GimbalDeviceCapFlags",
12996            value: tmp as u64,
12997        })?;
12998        __struct.custom_cap_flags = buf.get_u16_le()?;
12999        let mut tmp = [0_u8; 32usize];
13000        for v in &mut tmp {
13001            *v = buf.get_u8()?;
13002        }
13003        __struct.vendor_name = CharArray::new(tmp);
13004        let mut tmp = [0_u8; 32usize];
13005        for v in &mut tmp {
13006            *v = buf.get_u8()?;
13007        }
13008        __struct.model_name = CharArray::new(tmp);
13009        let mut tmp = [0_u8; 32usize];
13010        for v in &mut tmp {
13011            *v = buf.get_u8()?;
13012        }
13013        __struct.custom_name = CharArray::new(tmp);
13014        __struct.gimbal_device_id = buf.get_u8()?;
13015        Ok(__struct)
13016    }
13017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13018        let mut __tmp = BytesMut::new(bytes);
13019        #[allow(clippy::absurd_extreme_comparisons)]
13020        #[allow(unused_comparisons)]
13021        if __tmp.remaining() < Self::ENCODED_LEN {
13022            panic!(
13023                "buffer is too small (need {} bytes, but got {})",
13024                Self::ENCODED_LEN,
13025                __tmp.remaining(),
13026            )
13027        }
13028        __tmp.put_u64_le(self.uid);
13029        __tmp.put_u32_le(self.time_boot_ms);
13030        __tmp.put_u32_le(self.firmware_version);
13031        __tmp.put_u32_le(self.hardware_version);
13032        __tmp.put_f32_le(self.roll_min);
13033        __tmp.put_f32_le(self.roll_max);
13034        __tmp.put_f32_le(self.pitch_min);
13035        __tmp.put_f32_le(self.pitch_max);
13036        __tmp.put_f32_le(self.yaw_min);
13037        __tmp.put_f32_le(self.yaw_max);
13038        __tmp.put_u16_le(self.cap_flags.bits() as u16);
13039        __tmp.put_u16_le(self.custom_cap_flags);
13040        for val in &self.vendor_name {
13041            __tmp.put_u8(*val);
13042        }
13043        for val in &self.model_name {
13044            __tmp.put_u8(*val);
13045        }
13046        for val in &self.custom_name {
13047            __tmp.put_u8(*val);
13048        }
13049        if matches!(version, MavlinkVersion::V2) {
13050            __tmp.put_u8(self.gimbal_device_id);
13051            let len = __tmp.len();
13052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13053        } else {
13054            __tmp.len()
13055        }
13056    }
13057}
13058#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13059#[doc = ""]
13060#[doc = "ID: 284"]
13061#[derive(Debug, Clone, PartialEq)]
13062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13064#[cfg_attr(feature = "ts", derive(TS))]
13065#[cfg_attr(feature = "ts", ts(export))]
13066pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13067    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13069    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13070    pub q: [f32; 4],
13071    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13072    pub angular_velocity_x: f32,
13073    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13074    pub angular_velocity_y: f32,
13075    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13076    pub angular_velocity_z: f32,
13077    #[doc = "Low level gimbal flags."]
13078    pub flags: GimbalDeviceFlags,
13079    #[doc = "System ID"]
13080    pub target_system: u8,
13081    #[doc = "Component ID"]
13082    pub target_component: u8,
13083}
13084impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13085    pub const ENCODED_LEN: usize = 32usize;
13086    pub const DEFAULT: Self = Self {
13087        q: [0.0_f32; 4usize],
13088        angular_velocity_x: 0.0_f32,
13089        angular_velocity_y: 0.0_f32,
13090        angular_velocity_z: 0.0_f32,
13091        flags: GimbalDeviceFlags::DEFAULT,
13092        target_system: 0_u8,
13093        target_component: 0_u8,
13094    };
13095    #[cfg(feature = "arbitrary")]
13096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13097        use arbitrary::{Arbitrary, Unstructured};
13098        let mut buf = [0u8; 1024];
13099        rng.fill_bytes(&mut buf);
13100        let mut unstructured = Unstructured::new(&buf);
13101        Self::arbitrary(&mut unstructured).unwrap_or_default()
13102    }
13103}
13104impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13105    fn default() -> Self {
13106        Self::DEFAULT.clone()
13107    }
13108}
13109impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13110    type Message = MavMessage;
13111    const ID: u32 = 284u32;
13112    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13113    const EXTRA_CRC: u8 = 99u8;
13114    const ENCODED_LEN: usize = 32usize;
13115    fn deser(
13116        _version: MavlinkVersion,
13117        __input: &[u8],
13118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13119        let avail_len = __input.len();
13120        let mut payload_buf = [0; Self::ENCODED_LEN];
13121        let mut buf = if avail_len < Self::ENCODED_LEN {
13122            payload_buf[0..avail_len].copy_from_slice(__input);
13123            Bytes::new(&payload_buf)
13124        } else {
13125            Bytes::new(__input)
13126        };
13127        let mut __struct = Self::default();
13128        for v in &mut __struct.q {
13129            let val = buf.get_f32_le()?;
13130            *v = val;
13131        }
13132        __struct.angular_velocity_x = buf.get_f32_le()?;
13133        __struct.angular_velocity_y = buf.get_f32_le()?;
13134        __struct.angular_velocity_z = buf.get_f32_le()?;
13135        let tmp = buf.get_u16_le()?;
13136        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13137            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13138                flag_type: "GimbalDeviceFlags",
13139                value: tmp as u64,
13140            })?;
13141        __struct.target_system = buf.get_u8()?;
13142        __struct.target_component = buf.get_u8()?;
13143        Ok(__struct)
13144    }
13145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13146        let mut __tmp = BytesMut::new(bytes);
13147        #[allow(clippy::absurd_extreme_comparisons)]
13148        #[allow(unused_comparisons)]
13149        if __tmp.remaining() < Self::ENCODED_LEN {
13150            panic!(
13151                "buffer is too small (need {} bytes, but got {})",
13152                Self::ENCODED_LEN,
13153                __tmp.remaining(),
13154            )
13155        }
13156        for val in &self.q {
13157            __tmp.put_f32_le(*val);
13158        }
13159        __tmp.put_f32_le(self.angular_velocity_x);
13160        __tmp.put_f32_le(self.angular_velocity_y);
13161        __tmp.put_f32_le(self.angular_velocity_z);
13162        __tmp.put_u16_le(self.flags.bits() as u16);
13163        __tmp.put_u8(self.target_system);
13164        __tmp.put_u8(self.target_component);
13165        if matches!(version, MavlinkVersion::V2) {
13166            let len = __tmp.len();
13167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13168        } else {
13169            __tmp.len()
13170        }
13171    }
13172}
13173#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13174#[doc = ""]
13175#[doc = "ID: 280"]
13176#[derive(Debug, Clone, PartialEq)]
13177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13179#[cfg_attr(feature = "ts", derive(TS))]
13180#[cfg_attr(feature = "ts", ts(export))]
13181pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13182    #[doc = "Timestamp (time since system boot)."]
13183    pub time_boot_ms: u32,
13184    #[doc = "Bitmap of gimbal capability flags."]
13185    pub cap_flags: GimbalManagerCapFlags,
13186    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13187    pub roll_min: f32,
13188    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13189    pub roll_max: f32,
13190    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13191    pub pitch_min: f32,
13192    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13193    pub pitch_max: f32,
13194    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13195    pub yaw_min: f32,
13196    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13197    pub yaw_max: f32,
13198    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13199    pub gimbal_device_id: u8,
13200}
13201impl GIMBAL_MANAGER_INFORMATION_DATA {
13202    pub const ENCODED_LEN: usize = 33usize;
13203    pub const DEFAULT: Self = Self {
13204        time_boot_ms: 0_u32,
13205        cap_flags: GimbalManagerCapFlags::DEFAULT,
13206        roll_min: 0.0_f32,
13207        roll_max: 0.0_f32,
13208        pitch_min: 0.0_f32,
13209        pitch_max: 0.0_f32,
13210        yaw_min: 0.0_f32,
13211        yaw_max: 0.0_f32,
13212        gimbal_device_id: 0_u8,
13213    };
13214    #[cfg(feature = "arbitrary")]
13215    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13216        use arbitrary::{Arbitrary, Unstructured};
13217        let mut buf = [0u8; 1024];
13218        rng.fill_bytes(&mut buf);
13219        let mut unstructured = Unstructured::new(&buf);
13220        Self::arbitrary(&mut unstructured).unwrap_or_default()
13221    }
13222}
13223impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13224    fn default() -> Self {
13225        Self::DEFAULT.clone()
13226    }
13227}
13228impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13229    type Message = MavMessage;
13230    const ID: u32 = 280u32;
13231    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13232    const EXTRA_CRC: u8 = 70u8;
13233    const ENCODED_LEN: usize = 33usize;
13234    fn deser(
13235        _version: MavlinkVersion,
13236        __input: &[u8],
13237    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13238        let avail_len = __input.len();
13239        let mut payload_buf = [0; Self::ENCODED_LEN];
13240        let mut buf = if avail_len < Self::ENCODED_LEN {
13241            payload_buf[0..avail_len].copy_from_slice(__input);
13242            Bytes::new(&payload_buf)
13243        } else {
13244            Bytes::new(__input)
13245        };
13246        let mut __struct = Self::default();
13247        __struct.time_boot_ms = buf.get_u32_le()?;
13248        let tmp = buf.get_u32_le()?;
13249        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13250            tmp as <GimbalManagerCapFlags as Flags>::Bits,
13251        )
13252        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13253            flag_type: "GimbalManagerCapFlags",
13254            value: tmp as u64,
13255        })?;
13256        __struct.roll_min = buf.get_f32_le()?;
13257        __struct.roll_max = buf.get_f32_le()?;
13258        __struct.pitch_min = buf.get_f32_le()?;
13259        __struct.pitch_max = buf.get_f32_le()?;
13260        __struct.yaw_min = buf.get_f32_le()?;
13261        __struct.yaw_max = buf.get_f32_le()?;
13262        __struct.gimbal_device_id = buf.get_u8()?;
13263        Ok(__struct)
13264    }
13265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13266        let mut __tmp = BytesMut::new(bytes);
13267        #[allow(clippy::absurd_extreme_comparisons)]
13268        #[allow(unused_comparisons)]
13269        if __tmp.remaining() < Self::ENCODED_LEN {
13270            panic!(
13271                "buffer is too small (need {} bytes, but got {})",
13272                Self::ENCODED_LEN,
13273                __tmp.remaining(),
13274            )
13275        }
13276        __tmp.put_u32_le(self.time_boot_ms);
13277        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13278        __tmp.put_f32_le(self.roll_min);
13279        __tmp.put_f32_le(self.roll_max);
13280        __tmp.put_f32_le(self.pitch_min);
13281        __tmp.put_f32_le(self.pitch_max);
13282        __tmp.put_f32_le(self.yaw_min);
13283        __tmp.put_f32_le(self.yaw_max);
13284        __tmp.put_u8(self.gimbal_device_id);
13285        if matches!(version, MavlinkVersion::V2) {
13286            let len = __tmp.len();
13287            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13288        } else {
13289            __tmp.len()
13290        }
13291    }
13292}
13293#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13294#[doc = ""]
13295#[doc = "ID: 282"]
13296#[derive(Debug, Clone, PartialEq)]
13297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13299#[cfg_attr(feature = "ts", derive(TS))]
13300#[cfg_attr(feature = "ts", ts(export))]
13301pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13302    #[doc = "High level gimbal manager flags to use."]
13303    pub flags: GimbalManagerFlags,
13304    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13305    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13306    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13307    pub q: [f32; 4],
13308    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13309    pub angular_velocity_x: f32,
13310    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13311    pub angular_velocity_y: f32,
13312    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13313    pub angular_velocity_z: f32,
13314    #[doc = "System ID"]
13315    pub target_system: u8,
13316    #[doc = "Component ID"]
13317    pub target_component: u8,
13318    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13319    pub gimbal_device_id: u8,
13320}
13321impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13322    pub const ENCODED_LEN: usize = 35usize;
13323    pub const DEFAULT: Self = Self {
13324        flags: GimbalManagerFlags::DEFAULT,
13325        q: [0.0_f32; 4usize],
13326        angular_velocity_x: 0.0_f32,
13327        angular_velocity_y: 0.0_f32,
13328        angular_velocity_z: 0.0_f32,
13329        target_system: 0_u8,
13330        target_component: 0_u8,
13331        gimbal_device_id: 0_u8,
13332    };
13333    #[cfg(feature = "arbitrary")]
13334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13335        use arbitrary::{Arbitrary, Unstructured};
13336        let mut buf = [0u8; 1024];
13337        rng.fill_bytes(&mut buf);
13338        let mut unstructured = Unstructured::new(&buf);
13339        Self::arbitrary(&mut unstructured).unwrap_or_default()
13340    }
13341}
13342impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13343    fn default() -> Self {
13344        Self::DEFAULT.clone()
13345    }
13346}
13347impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13348    type Message = MavMessage;
13349    const ID: u32 = 282u32;
13350    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13351    const EXTRA_CRC: u8 = 123u8;
13352    const ENCODED_LEN: usize = 35usize;
13353    fn deser(
13354        _version: MavlinkVersion,
13355        __input: &[u8],
13356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13357        let avail_len = __input.len();
13358        let mut payload_buf = [0; Self::ENCODED_LEN];
13359        let mut buf = if avail_len < Self::ENCODED_LEN {
13360            payload_buf[0..avail_len].copy_from_slice(__input);
13361            Bytes::new(&payload_buf)
13362        } else {
13363            Bytes::new(__input)
13364        };
13365        let mut __struct = Self::default();
13366        let tmp = buf.get_u32_le()?;
13367        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13368            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13369                flag_type: "GimbalManagerFlags",
13370                value: tmp as u64,
13371            })?;
13372        for v in &mut __struct.q {
13373            let val = buf.get_f32_le()?;
13374            *v = val;
13375        }
13376        __struct.angular_velocity_x = buf.get_f32_le()?;
13377        __struct.angular_velocity_y = buf.get_f32_le()?;
13378        __struct.angular_velocity_z = buf.get_f32_le()?;
13379        __struct.target_system = buf.get_u8()?;
13380        __struct.target_component = buf.get_u8()?;
13381        __struct.gimbal_device_id = buf.get_u8()?;
13382        Ok(__struct)
13383    }
13384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13385        let mut __tmp = BytesMut::new(bytes);
13386        #[allow(clippy::absurd_extreme_comparisons)]
13387        #[allow(unused_comparisons)]
13388        if __tmp.remaining() < Self::ENCODED_LEN {
13389            panic!(
13390                "buffer is too small (need {} bytes, but got {})",
13391                Self::ENCODED_LEN,
13392                __tmp.remaining(),
13393            )
13394        }
13395        __tmp.put_u32_le(self.flags.bits() as u32);
13396        for val in &self.q {
13397            __tmp.put_f32_le(*val);
13398        }
13399        __tmp.put_f32_le(self.angular_velocity_x);
13400        __tmp.put_f32_le(self.angular_velocity_y);
13401        __tmp.put_f32_le(self.angular_velocity_z);
13402        __tmp.put_u8(self.target_system);
13403        __tmp.put_u8(self.target_component);
13404        __tmp.put_u8(self.gimbal_device_id);
13405        if matches!(version, MavlinkVersion::V2) {
13406            let len = __tmp.len();
13407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13408        } else {
13409            __tmp.len()
13410        }
13411    }
13412}
13413#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13414#[doc = ""]
13415#[doc = "ID: 288"]
13416#[derive(Debug, Clone, PartialEq)]
13417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13419#[cfg_attr(feature = "ts", derive(TS))]
13420#[cfg_attr(feature = "ts", ts(export))]
13421pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13422    #[doc = "High level gimbal manager flags."]
13423    pub flags: GimbalManagerFlags,
13424    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13425    pub pitch: f32,
13426    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13427    pub yaw: f32,
13428    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13429    pub pitch_rate: f32,
13430    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13431    pub yaw_rate: f32,
13432    #[doc = "System ID"]
13433    pub target_system: u8,
13434    #[doc = "Component ID"]
13435    pub target_component: u8,
13436    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13437    pub gimbal_device_id: u8,
13438}
13439impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13440    pub const ENCODED_LEN: usize = 23usize;
13441    pub const DEFAULT: Self = Self {
13442        flags: GimbalManagerFlags::DEFAULT,
13443        pitch: 0.0_f32,
13444        yaw: 0.0_f32,
13445        pitch_rate: 0.0_f32,
13446        yaw_rate: 0.0_f32,
13447        target_system: 0_u8,
13448        target_component: 0_u8,
13449        gimbal_device_id: 0_u8,
13450    };
13451    #[cfg(feature = "arbitrary")]
13452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13453        use arbitrary::{Arbitrary, Unstructured};
13454        let mut buf = [0u8; 1024];
13455        rng.fill_bytes(&mut buf);
13456        let mut unstructured = Unstructured::new(&buf);
13457        Self::arbitrary(&mut unstructured).unwrap_or_default()
13458    }
13459}
13460impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13461    fn default() -> Self {
13462        Self::DEFAULT.clone()
13463    }
13464}
13465impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13466    type Message = MavMessage;
13467    const ID: u32 = 288u32;
13468    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13469    const EXTRA_CRC: u8 = 20u8;
13470    const ENCODED_LEN: usize = 23usize;
13471    fn deser(
13472        _version: MavlinkVersion,
13473        __input: &[u8],
13474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13475        let avail_len = __input.len();
13476        let mut payload_buf = [0; Self::ENCODED_LEN];
13477        let mut buf = if avail_len < Self::ENCODED_LEN {
13478            payload_buf[0..avail_len].copy_from_slice(__input);
13479            Bytes::new(&payload_buf)
13480        } else {
13481            Bytes::new(__input)
13482        };
13483        let mut __struct = Self::default();
13484        let tmp = buf.get_u32_le()?;
13485        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13486            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13487                flag_type: "GimbalManagerFlags",
13488                value: tmp as u64,
13489            })?;
13490        __struct.pitch = buf.get_f32_le()?;
13491        __struct.yaw = buf.get_f32_le()?;
13492        __struct.pitch_rate = buf.get_f32_le()?;
13493        __struct.yaw_rate = buf.get_f32_le()?;
13494        __struct.target_system = buf.get_u8()?;
13495        __struct.target_component = buf.get_u8()?;
13496        __struct.gimbal_device_id = buf.get_u8()?;
13497        Ok(__struct)
13498    }
13499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13500        let mut __tmp = BytesMut::new(bytes);
13501        #[allow(clippy::absurd_extreme_comparisons)]
13502        #[allow(unused_comparisons)]
13503        if __tmp.remaining() < Self::ENCODED_LEN {
13504            panic!(
13505                "buffer is too small (need {} bytes, but got {})",
13506                Self::ENCODED_LEN,
13507                __tmp.remaining(),
13508            )
13509        }
13510        __tmp.put_u32_le(self.flags.bits() as u32);
13511        __tmp.put_f32_le(self.pitch);
13512        __tmp.put_f32_le(self.yaw);
13513        __tmp.put_f32_le(self.pitch_rate);
13514        __tmp.put_f32_le(self.yaw_rate);
13515        __tmp.put_u8(self.target_system);
13516        __tmp.put_u8(self.target_component);
13517        __tmp.put_u8(self.gimbal_device_id);
13518        if matches!(version, MavlinkVersion::V2) {
13519            let len = __tmp.len();
13520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13521        } else {
13522            __tmp.len()
13523        }
13524    }
13525}
13526#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13527#[doc = ""]
13528#[doc = "ID: 287"]
13529#[derive(Debug, Clone, PartialEq)]
13530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13532#[cfg_attr(feature = "ts", derive(TS))]
13533#[cfg_attr(feature = "ts", ts(export))]
13534pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13535    #[doc = "High level gimbal manager flags to use."]
13536    pub flags: GimbalManagerFlags,
13537    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13538    pub pitch: f32,
13539    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13540    pub yaw: f32,
13541    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13542    pub pitch_rate: f32,
13543    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13544    pub yaw_rate: f32,
13545    #[doc = "System ID"]
13546    pub target_system: u8,
13547    #[doc = "Component ID"]
13548    pub target_component: u8,
13549    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13550    pub gimbal_device_id: u8,
13551}
13552impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13553    pub const ENCODED_LEN: usize = 23usize;
13554    pub const DEFAULT: Self = Self {
13555        flags: GimbalManagerFlags::DEFAULT,
13556        pitch: 0.0_f32,
13557        yaw: 0.0_f32,
13558        pitch_rate: 0.0_f32,
13559        yaw_rate: 0.0_f32,
13560        target_system: 0_u8,
13561        target_component: 0_u8,
13562        gimbal_device_id: 0_u8,
13563    };
13564    #[cfg(feature = "arbitrary")]
13565    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13566        use arbitrary::{Arbitrary, Unstructured};
13567        let mut buf = [0u8; 1024];
13568        rng.fill_bytes(&mut buf);
13569        let mut unstructured = Unstructured::new(&buf);
13570        Self::arbitrary(&mut unstructured).unwrap_or_default()
13571    }
13572}
13573impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13574    fn default() -> Self {
13575        Self::DEFAULT.clone()
13576    }
13577}
13578impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13579    type Message = MavMessage;
13580    const ID: u32 = 287u32;
13581    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13582    const EXTRA_CRC: u8 = 1u8;
13583    const ENCODED_LEN: usize = 23usize;
13584    fn deser(
13585        _version: MavlinkVersion,
13586        __input: &[u8],
13587    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13588        let avail_len = __input.len();
13589        let mut payload_buf = [0; Self::ENCODED_LEN];
13590        let mut buf = if avail_len < Self::ENCODED_LEN {
13591            payload_buf[0..avail_len].copy_from_slice(__input);
13592            Bytes::new(&payload_buf)
13593        } else {
13594            Bytes::new(__input)
13595        };
13596        let mut __struct = Self::default();
13597        let tmp = buf.get_u32_le()?;
13598        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13599            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13600                flag_type: "GimbalManagerFlags",
13601                value: tmp as u64,
13602            })?;
13603        __struct.pitch = buf.get_f32_le()?;
13604        __struct.yaw = buf.get_f32_le()?;
13605        __struct.pitch_rate = buf.get_f32_le()?;
13606        __struct.yaw_rate = buf.get_f32_le()?;
13607        __struct.target_system = buf.get_u8()?;
13608        __struct.target_component = buf.get_u8()?;
13609        __struct.gimbal_device_id = buf.get_u8()?;
13610        Ok(__struct)
13611    }
13612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13613        let mut __tmp = BytesMut::new(bytes);
13614        #[allow(clippy::absurd_extreme_comparisons)]
13615        #[allow(unused_comparisons)]
13616        if __tmp.remaining() < Self::ENCODED_LEN {
13617            panic!(
13618                "buffer is too small (need {} bytes, but got {})",
13619                Self::ENCODED_LEN,
13620                __tmp.remaining(),
13621            )
13622        }
13623        __tmp.put_u32_le(self.flags.bits() as u32);
13624        __tmp.put_f32_le(self.pitch);
13625        __tmp.put_f32_le(self.yaw);
13626        __tmp.put_f32_le(self.pitch_rate);
13627        __tmp.put_f32_le(self.yaw_rate);
13628        __tmp.put_u8(self.target_system);
13629        __tmp.put_u8(self.target_component);
13630        __tmp.put_u8(self.gimbal_device_id);
13631        if matches!(version, MavlinkVersion::V2) {
13632            let len = __tmp.len();
13633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13634        } else {
13635            __tmp.len()
13636        }
13637    }
13638}
13639#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13640#[doc = ""]
13641#[doc = "ID: 281"]
13642#[derive(Debug, Clone, PartialEq)]
13643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13645#[cfg_attr(feature = "ts", derive(TS))]
13646#[cfg_attr(feature = "ts", ts(export))]
13647pub struct GIMBAL_MANAGER_STATUS_DATA {
13648    #[doc = "Timestamp (time since system boot)."]
13649    pub time_boot_ms: u32,
13650    #[doc = "High level gimbal manager flags currently applied."]
13651    pub flags: GimbalManagerFlags,
13652    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13653    pub gimbal_device_id: u8,
13654    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13655    pub primary_control_sysid: u8,
13656    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13657    pub primary_control_compid: u8,
13658    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13659    pub secondary_control_sysid: u8,
13660    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13661    pub secondary_control_compid: u8,
13662}
13663impl GIMBAL_MANAGER_STATUS_DATA {
13664    pub const ENCODED_LEN: usize = 13usize;
13665    pub const DEFAULT: Self = Self {
13666        time_boot_ms: 0_u32,
13667        flags: GimbalManagerFlags::DEFAULT,
13668        gimbal_device_id: 0_u8,
13669        primary_control_sysid: 0_u8,
13670        primary_control_compid: 0_u8,
13671        secondary_control_sysid: 0_u8,
13672        secondary_control_compid: 0_u8,
13673    };
13674    #[cfg(feature = "arbitrary")]
13675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13676        use arbitrary::{Arbitrary, Unstructured};
13677        let mut buf = [0u8; 1024];
13678        rng.fill_bytes(&mut buf);
13679        let mut unstructured = Unstructured::new(&buf);
13680        Self::arbitrary(&mut unstructured).unwrap_or_default()
13681    }
13682}
13683impl Default for GIMBAL_MANAGER_STATUS_DATA {
13684    fn default() -> Self {
13685        Self::DEFAULT.clone()
13686    }
13687}
13688impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13689    type Message = MavMessage;
13690    const ID: u32 = 281u32;
13691    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13692    const EXTRA_CRC: u8 = 48u8;
13693    const ENCODED_LEN: usize = 13usize;
13694    fn deser(
13695        _version: MavlinkVersion,
13696        __input: &[u8],
13697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13698        let avail_len = __input.len();
13699        let mut payload_buf = [0; Self::ENCODED_LEN];
13700        let mut buf = if avail_len < Self::ENCODED_LEN {
13701            payload_buf[0..avail_len].copy_from_slice(__input);
13702            Bytes::new(&payload_buf)
13703        } else {
13704            Bytes::new(__input)
13705        };
13706        let mut __struct = Self::default();
13707        __struct.time_boot_ms = buf.get_u32_le()?;
13708        let tmp = buf.get_u32_le()?;
13709        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13710            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13711                flag_type: "GimbalManagerFlags",
13712                value: tmp as u64,
13713            })?;
13714        __struct.gimbal_device_id = buf.get_u8()?;
13715        __struct.primary_control_sysid = buf.get_u8()?;
13716        __struct.primary_control_compid = buf.get_u8()?;
13717        __struct.secondary_control_sysid = buf.get_u8()?;
13718        __struct.secondary_control_compid = buf.get_u8()?;
13719        Ok(__struct)
13720    }
13721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13722        let mut __tmp = BytesMut::new(bytes);
13723        #[allow(clippy::absurd_extreme_comparisons)]
13724        #[allow(unused_comparisons)]
13725        if __tmp.remaining() < Self::ENCODED_LEN {
13726            panic!(
13727                "buffer is too small (need {} bytes, but got {})",
13728                Self::ENCODED_LEN,
13729                __tmp.remaining(),
13730            )
13731        }
13732        __tmp.put_u32_le(self.time_boot_ms);
13733        __tmp.put_u32_le(self.flags.bits() as u32);
13734        __tmp.put_u8(self.gimbal_device_id);
13735        __tmp.put_u8(self.primary_control_sysid);
13736        __tmp.put_u8(self.primary_control_compid);
13737        __tmp.put_u8(self.secondary_control_sysid);
13738        __tmp.put_u8(self.secondary_control_compid);
13739        if matches!(version, MavlinkVersion::V2) {
13740            let len = __tmp.len();
13741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13742        } else {
13743            __tmp.len()
13744        }
13745    }
13746}
13747#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13748#[doc = ""]
13749#[doc = "ID: 33"]
13750#[derive(Debug, Clone, PartialEq)]
13751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13753#[cfg_attr(feature = "ts", derive(TS))]
13754#[cfg_attr(feature = "ts", ts(export))]
13755pub struct GLOBAL_POSITION_INT_DATA {
13756    #[doc = "Timestamp (time since system boot)."]
13757    pub time_boot_ms: u32,
13758    #[doc = "Latitude, expressed"]
13759    pub lat: i32,
13760    #[doc = "Longitude, expressed"]
13761    pub lon: i32,
13762    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13763    pub alt: i32,
13764    #[doc = "Altitude above home"]
13765    pub relative_alt: i32,
13766    #[doc = "Ground X Speed (Latitude, positive north)"]
13767    pub vx: i16,
13768    #[doc = "Ground Y Speed (Longitude, positive east)"]
13769    pub vy: i16,
13770    #[doc = "Ground Z Speed (Altitude, positive down)"]
13771    pub vz: i16,
13772    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13773    pub hdg: u16,
13774}
13775impl GLOBAL_POSITION_INT_DATA {
13776    pub const ENCODED_LEN: usize = 28usize;
13777    pub const DEFAULT: Self = Self {
13778        time_boot_ms: 0_u32,
13779        lat: 0_i32,
13780        lon: 0_i32,
13781        alt: 0_i32,
13782        relative_alt: 0_i32,
13783        vx: 0_i16,
13784        vy: 0_i16,
13785        vz: 0_i16,
13786        hdg: 0_u16,
13787    };
13788    #[cfg(feature = "arbitrary")]
13789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13790        use arbitrary::{Arbitrary, Unstructured};
13791        let mut buf = [0u8; 1024];
13792        rng.fill_bytes(&mut buf);
13793        let mut unstructured = Unstructured::new(&buf);
13794        Self::arbitrary(&mut unstructured).unwrap_or_default()
13795    }
13796}
13797impl Default for GLOBAL_POSITION_INT_DATA {
13798    fn default() -> Self {
13799        Self::DEFAULT.clone()
13800    }
13801}
13802impl MessageData for GLOBAL_POSITION_INT_DATA {
13803    type Message = MavMessage;
13804    const ID: u32 = 33u32;
13805    const NAME: &'static str = "GLOBAL_POSITION_INT";
13806    const EXTRA_CRC: u8 = 104u8;
13807    const ENCODED_LEN: usize = 28usize;
13808    fn deser(
13809        _version: MavlinkVersion,
13810        __input: &[u8],
13811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13812        let avail_len = __input.len();
13813        let mut payload_buf = [0; Self::ENCODED_LEN];
13814        let mut buf = if avail_len < Self::ENCODED_LEN {
13815            payload_buf[0..avail_len].copy_from_slice(__input);
13816            Bytes::new(&payload_buf)
13817        } else {
13818            Bytes::new(__input)
13819        };
13820        let mut __struct = Self::default();
13821        __struct.time_boot_ms = buf.get_u32_le()?;
13822        __struct.lat = buf.get_i32_le()?;
13823        __struct.lon = buf.get_i32_le()?;
13824        __struct.alt = buf.get_i32_le()?;
13825        __struct.relative_alt = buf.get_i32_le()?;
13826        __struct.vx = buf.get_i16_le()?;
13827        __struct.vy = buf.get_i16_le()?;
13828        __struct.vz = buf.get_i16_le()?;
13829        __struct.hdg = buf.get_u16_le()?;
13830        Ok(__struct)
13831    }
13832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13833        let mut __tmp = BytesMut::new(bytes);
13834        #[allow(clippy::absurd_extreme_comparisons)]
13835        #[allow(unused_comparisons)]
13836        if __tmp.remaining() < Self::ENCODED_LEN {
13837            panic!(
13838                "buffer is too small (need {} bytes, but got {})",
13839                Self::ENCODED_LEN,
13840                __tmp.remaining(),
13841            )
13842        }
13843        __tmp.put_u32_le(self.time_boot_ms);
13844        __tmp.put_i32_le(self.lat);
13845        __tmp.put_i32_le(self.lon);
13846        __tmp.put_i32_le(self.alt);
13847        __tmp.put_i32_le(self.relative_alt);
13848        __tmp.put_i16_le(self.vx);
13849        __tmp.put_i16_le(self.vy);
13850        __tmp.put_i16_le(self.vz);
13851        __tmp.put_u16_le(self.hdg);
13852        if matches!(version, MavlinkVersion::V2) {
13853            let len = __tmp.len();
13854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13855        } else {
13856            __tmp.len()
13857        }
13858    }
13859}
13860#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13861#[doc = ""]
13862#[doc = "ID: 63"]
13863#[derive(Debug, Clone, PartialEq)]
13864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13866#[cfg_attr(feature = "ts", derive(TS))]
13867#[cfg_attr(feature = "ts", ts(export))]
13868pub struct GLOBAL_POSITION_INT_COV_DATA {
13869    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13870    pub time_usec: u64,
13871    #[doc = "Latitude"]
13872    pub lat: i32,
13873    #[doc = "Longitude"]
13874    pub lon: i32,
13875    #[doc = "Altitude in meters above MSL"]
13876    pub alt: i32,
13877    #[doc = "Altitude above ground"]
13878    pub relative_alt: i32,
13879    #[doc = "Ground X Speed (Latitude)"]
13880    pub vx: f32,
13881    #[doc = "Ground Y Speed (Longitude)"]
13882    pub vy: f32,
13883    #[doc = "Ground Z Speed (Altitude)"]
13884    pub vz: f32,
13885    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13886    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13887    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13888    pub covariance: [f32; 36],
13889    #[doc = "Class id of the estimator this estimate originated from."]
13890    pub estimator_type: MavEstimatorType,
13891}
13892impl GLOBAL_POSITION_INT_COV_DATA {
13893    pub const ENCODED_LEN: usize = 181usize;
13894    pub const DEFAULT: Self = Self {
13895        time_usec: 0_u64,
13896        lat: 0_i32,
13897        lon: 0_i32,
13898        alt: 0_i32,
13899        relative_alt: 0_i32,
13900        vx: 0.0_f32,
13901        vy: 0.0_f32,
13902        vz: 0.0_f32,
13903        covariance: [0.0_f32; 36usize],
13904        estimator_type: MavEstimatorType::DEFAULT,
13905    };
13906    #[cfg(feature = "arbitrary")]
13907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13908        use arbitrary::{Arbitrary, Unstructured};
13909        let mut buf = [0u8; 1024];
13910        rng.fill_bytes(&mut buf);
13911        let mut unstructured = Unstructured::new(&buf);
13912        Self::arbitrary(&mut unstructured).unwrap_or_default()
13913    }
13914}
13915impl Default for GLOBAL_POSITION_INT_COV_DATA {
13916    fn default() -> Self {
13917        Self::DEFAULT.clone()
13918    }
13919}
13920impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13921    type Message = MavMessage;
13922    const ID: u32 = 63u32;
13923    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13924    const EXTRA_CRC: u8 = 119u8;
13925    const ENCODED_LEN: usize = 181usize;
13926    fn deser(
13927        _version: MavlinkVersion,
13928        __input: &[u8],
13929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13930        let avail_len = __input.len();
13931        let mut payload_buf = [0; Self::ENCODED_LEN];
13932        let mut buf = if avail_len < Self::ENCODED_LEN {
13933            payload_buf[0..avail_len].copy_from_slice(__input);
13934            Bytes::new(&payload_buf)
13935        } else {
13936            Bytes::new(__input)
13937        };
13938        let mut __struct = Self::default();
13939        __struct.time_usec = buf.get_u64_le()?;
13940        __struct.lat = buf.get_i32_le()?;
13941        __struct.lon = buf.get_i32_le()?;
13942        __struct.alt = buf.get_i32_le()?;
13943        __struct.relative_alt = buf.get_i32_le()?;
13944        __struct.vx = buf.get_f32_le()?;
13945        __struct.vy = buf.get_f32_le()?;
13946        __struct.vz = buf.get_f32_le()?;
13947        for v in &mut __struct.covariance {
13948            let val = buf.get_f32_le()?;
13949            *v = val;
13950        }
13951        let tmp = buf.get_u8()?;
13952        __struct.estimator_type =
13953            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13954                enum_type: "MavEstimatorType",
13955                value: tmp as u64,
13956            })?;
13957        Ok(__struct)
13958    }
13959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13960        let mut __tmp = BytesMut::new(bytes);
13961        #[allow(clippy::absurd_extreme_comparisons)]
13962        #[allow(unused_comparisons)]
13963        if __tmp.remaining() < Self::ENCODED_LEN {
13964            panic!(
13965                "buffer is too small (need {} bytes, but got {})",
13966                Self::ENCODED_LEN,
13967                __tmp.remaining(),
13968            )
13969        }
13970        __tmp.put_u64_le(self.time_usec);
13971        __tmp.put_i32_le(self.lat);
13972        __tmp.put_i32_le(self.lon);
13973        __tmp.put_i32_le(self.alt);
13974        __tmp.put_i32_le(self.relative_alt);
13975        __tmp.put_f32_le(self.vx);
13976        __tmp.put_f32_le(self.vy);
13977        __tmp.put_f32_le(self.vz);
13978        for val in &self.covariance {
13979            __tmp.put_f32_le(*val);
13980        }
13981        __tmp.put_u8(self.estimator_type as u8);
13982        if matches!(version, MavlinkVersion::V2) {
13983            let len = __tmp.len();
13984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13985        } else {
13986            __tmp.len()
13987        }
13988    }
13989}
13990#[doc = "Global position/attitude estimate from a vision source."]
13991#[doc = ""]
13992#[doc = "ID: 101"]
13993#[derive(Debug, Clone, PartialEq)]
13994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13996#[cfg_attr(feature = "ts", derive(TS))]
13997#[cfg_attr(feature = "ts", ts(export))]
13998pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13999    #[doc = "Timestamp (UNIX time or since system boot)"]
14000    pub usec: u64,
14001    #[doc = "Global X position"]
14002    pub x: f32,
14003    #[doc = "Global Y position"]
14004    pub y: f32,
14005    #[doc = "Global Z position"]
14006    pub z: f32,
14007    #[doc = "Roll angle"]
14008    pub roll: f32,
14009    #[doc = "Pitch angle"]
14010    pub pitch: f32,
14011    #[doc = "Yaw angle"]
14012    pub yaw: f32,
14013    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14015    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14016    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14017    pub covariance: [f32; 21],
14018    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14019    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14020    pub reset_counter: u8,
14021}
14022impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14023    pub const ENCODED_LEN: usize = 117usize;
14024    pub const DEFAULT: Self = Self {
14025        usec: 0_u64,
14026        x: 0.0_f32,
14027        y: 0.0_f32,
14028        z: 0.0_f32,
14029        roll: 0.0_f32,
14030        pitch: 0.0_f32,
14031        yaw: 0.0_f32,
14032        covariance: [0.0_f32; 21usize],
14033        reset_counter: 0_u8,
14034    };
14035    #[cfg(feature = "arbitrary")]
14036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14037        use arbitrary::{Arbitrary, Unstructured};
14038        let mut buf = [0u8; 1024];
14039        rng.fill_bytes(&mut buf);
14040        let mut unstructured = Unstructured::new(&buf);
14041        Self::arbitrary(&mut unstructured).unwrap_or_default()
14042    }
14043}
14044impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14045    fn default() -> Self {
14046        Self::DEFAULT.clone()
14047    }
14048}
14049impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14050    type Message = MavMessage;
14051    const ID: u32 = 101u32;
14052    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14053    const EXTRA_CRC: u8 = 102u8;
14054    const ENCODED_LEN: usize = 117usize;
14055    fn deser(
14056        _version: MavlinkVersion,
14057        __input: &[u8],
14058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14059        let avail_len = __input.len();
14060        let mut payload_buf = [0; Self::ENCODED_LEN];
14061        let mut buf = if avail_len < Self::ENCODED_LEN {
14062            payload_buf[0..avail_len].copy_from_slice(__input);
14063            Bytes::new(&payload_buf)
14064        } else {
14065            Bytes::new(__input)
14066        };
14067        let mut __struct = Self::default();
14068        __struct.usec = buf.get_u64_le()?;
14069        __struct.x = buf.get_f32_le()?;
14070        __struct.y = buf.get_f32_le()?;
14071        __struct.z = buf.get_f32_le()?;
14072        __struct.roll = buf.get_f32_le()?;
14073        __struct.pitch = buf.get_f32_le()?;
14074        __struct.yaw = buf.get_f32_le()?;
14075        for v in &mut __struct.covariance {
14076            let val = buf.get_f32_le()?;
14077            *v = val;
14078        }
14079        __struct.reset_counter = buf.get_u8()?;
14080        Ok(__struct)
14081    }
14082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14083        let mut __tmp = BytesMut::new(bytes);
14084        #[allow(clippy::absurd_extreme_comparisons)]
14085        #[allow(unused_comparisons)]
14086        if __tmp.remaining() < Self::ENCODED_LEN {
14087            panic!(
14088                "buffer is too small (need {} bytes, but got {})",
14089                Self::ENCODED_LEN,
14090                __tmp.remaining(),
14091            )
14092        }
14093        __tmp.put_u64_le(self.usec);
14094        __tmp.put_f32_le(self.x);
14095        __tmp.put_f32_le(self.y);
14096        __tmp.put_f32_le(self.z);
14097        __tmp.put_f32_le(self.roll);
14098        __tmp.put_f32_le(self.pitch);
14099        __tmp.put_f32_le(self.yaw);
14100        if matches!(version, MavlinkVersion::V2) {
14101            for val in &self.covariance {
14102                __tmp.put_f32_le(*val);
14103            }
14104            __tmp.put_u8(self.reset_counter);
14105            let len = __tmp.len();
14106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14107        } else {
14108            __tmp.len()
14109        }
14110    }
14111}
14112#[doc = "Second GPS data."]
14113#[doc = ""]
14114#[doc = "ID: 124"]
14115#[derive(Debug, Clone, PartialEq)]
14116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14118#[cfg_attr(feature = "ts", derive(TS))]
14119#[cfg_attr(feature = "ts", ts(export))]
14120pub struct GPS2_RAW_DATA {
14121    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14122    pub time_usec: u64,
14123    #[doc = "Latitude (WGS84)"]
14124    pub lat: i32,
14125    #[doc = "Longitude (WGS84)"]
14126    pub lon: i32,
14127    #[doc = "Altitude (MSL). Positive for up."]
14128    pub alt: i32,
14129    #[doc = "Age of DGPS info"]
14130    pub dgps_age: u32,
14131    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14132    pub eph: u16,
14133    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14134    pub epv: u16,
14135    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14136    pub vel: u16,
14137    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14138    pub cog: u16,
14139    #[doc = "GPS fix type."]
14140    pub fix_type: GpsFixType,
14141    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14142    pub satellites_visible: u8,
14143    #[doc = "Number of DGPS satellites"]
14144    pub dgps_numch: u8,
14145    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14146    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14147    pub yaw: u16,
14148    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14149    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14150    pub alt_ellipsoid: i32,
14151    #[doc = "Position uncertainty."]
14152    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14153    pub h_acc: u32,
14154    #[doc = "Altitude uncertainty."]
14155    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14156    pub v_acc: u32,
14157    #[doc = "Speed uncertainty."]
14158    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14159    pub vel_acc: u32,
14160    #[doc = "Heading / track uncertainty"]
14161    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14162    pub hdg_acc: u32,
14163}
14164impl GPS2_RAW_DATA {
14165    pub const ENCODED_LEN: usize = 57usize;
14166    pub const DEFAULT: Self = Self {
14167        time_usec: 0_u64,
14168        lat: 0_i32,
14169        lon: 0_i32,
14170        alt: 0_i32,
14171        dgps_age: 0_u32,
14172        eph: 0_u16,
14173        epv: 0_u16,
14174        vel: 0_u16,
14175        cog: 0_u16,
14176        fix_type: GpsFixType::DEFAULT,
14177        satellites_visible: 0_u8,
14178        dgps_numch: 0_u8,
14179        yaw: 0_u16,
14180        alt_ellipsoid: 0_i32,
14181        h_acc: 0_u32,
14182        v_acc: 0_u32,
14183        vel_acc: 0_u32,
14184        hdg_acc: 0_u32,
14185    };
14186    #[cfg(feature = "arbitrary")]
14187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14188        use arbitrary::{Arbitrary, Unstructured};
14189        let mut buf = [0u8; 1024];
14190        rng.fill_bytes(&mut buf);
14191        let mut unstructured = Unstructured::new(&buf);
14192        Self::arbitrary(&mut unstructured).unwrap_or_default()
14193    }
14194}
14195impl Default for GPS2_RAW_DATA {
14196    fn default() -> Self {
14197        Self::DEFAULT.clone()
14198    }
14199}
14200impl MessageData for GPS2_RAW_DATA {
14201    type Message = MavMessage;
14202    const ID: u32 = 124u32;
14203    const NAME: &'static str = "GPS2_RAW";
14204    const EXTRA_CRC: u8 = 87u8;
14205    const ENCODED_LEN: usize = 57usize;
14206    fn deser(
14207        _version: MavlinkVersion,
14208        __input: &[u8],
14209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14210        let avail_len = __input.len();
14211        let mut payload_buf = [0; Self::ENCODED_LEN];
14212        let mut buf = if avail_len < Self::ENCODED_LEN {
14213            payload_buf[0..avail_len].copy_from_slice(__input);
14214            Bytes::new(&payload_buf)
14215        } else {
14216            Bytes::new(__input)
14217        };
14218        let mut __struct = Self::default();
14219        __struct.time_usec = buf.get_u64_le()?;
14220        __struct.lat = buf.get_i32_le()?;
14221        __struct.lon = buf.get_i32_le()?;
14222        __struct.alt = buf.get_i32_le()?;
14223        __struct.dgps_age = buf.get_u32_le()?;
14224        __struct.eph = buf.get_u16_le()?;
14225        __struct.epv = buf.get_u16_le()?;
14226        __struct.vel = buf.get_u16_le()?;
14227        __struct.cog = buf.get_u16_le()?;
14228        let tmp = buf.get_u8()?;
14229        __struct.fix_type =
14230            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14231                enum_type: "GpsFixType",
14232                value: tmp as u64,
14233            })?;
14234        __struct.satellites_visible = buf.get_u8()?;
14235        __struct.dgps_numch = buf.get_u8()?;
14236        __struct.yaw = buf.get_u16_le()?;
14237        __struct.alt_ellipsoid = buf.get_i32_le()?;
14238        __struct.h_acc = buf.get_u32_le()?;
14239        __struct.v_acc = buf.get_u32_le()?;
14240        __struct.vel_acc = buf.get_u32_le()?;
14241        __struct.hdg_acc = buf.get_u32_le()?;
14242        Ok(__struct)
14243    }
14244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14245        let mut __tmp = BytesMut::new(bytes);
14246        #[allow(clippy::absurd_extreme_comparisons)]
14247        #[allow(unused_comparisons)]
14248        if __tmp.remaining() < Self::ENCODED_LEN {
14249            panic!(
14250                "buffer is too small (need {} bytes, but got {})",
14251                Self::ENCODED_LEN,
14252                __tmp.remaining(),
14253            )
14254        }
14255        __tmp.put_u64_le(self.time_usec);
14256        __tmp.put_i32_le(self.lat);
14257        __tmp.put_i32_le(self.lon);
14258        __tmp.put_i32_le(self.alt);
14259        __tmp.put_u32_le(self.dgps_age);
14260        __tmp.put_u16_le(self.eph);
14261        __tmp.put_u16_le(self.epv);
14262        __tmp.put_u16_le(self.vel);
14263        __tmp.put_u16_le(self.cog);
14264        __tmp.put_u8(self.fix_type as u8);
14265        __tmp.put_u8(self.satellites_visible);
14266        __tmp.put_u8(self.dgps_numch);
14267        if matches!(version, MavlinkVersion::V2) {
14268            __tmp.put_u16_le(self.yaw);
14269            __tmp.put_i32_le(self.alt_ellipsoid);
14270            __tmp.put_u32_le(self.h_acc);
14271            __tmp.put_u32_le(self.v_acc);
14272            __tmp.put_u32_le(self.vel_acc);
14273            __tmp.put_u32_le(self.hdg_acc);
14274            let len = __tmp.len();
14275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14276        } else {
14277            __tmp.len()
14278        }
14279    }
14280}
14281#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14282#[doc = ""]
14283#[doc = "ID: 128"]
14284#[derive(Debug, Clone, PartialEq)]
14285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14287#[cfg_attr(feature = "ts", derive(TS))]
14288#[cfg_attr(feature = "ts", ts(export))]
14289pub struct GPS2_RTK_DATA {
14290    #[doc = "Time since boot of last baseline message received."]
14291    pub time_last_baseline_ms: u32,
14292    #[doc = "GPS Time of Week of last baseline"]
14293    pub tow: u32,
14294    #[doc = "Current baseline in ECEF x or NED north component."]
14295    pub baseline_a_mm: i32,
14296    #[doc = "Current baseline in ECEF y or NED east component."]
14297    pub baseline_b_mm: i32,
14298    #[doc = "Current baseline in ECEF z or NED down component."]
14299    pub baseline_c_mm: i32,
14300    #[doc = "Current estimate of baseline accuracy."]
14301    pub accuracy: u32,
14302    #[doc = "Current number of integer ambiguity hypotheses."]
14303    pub iar_num_hypotheses: i32,
14304    #[doc = "GPS Week Number of last baseline"]
14305    pub wn: u16,
14306    #[doc = "Identification of connected RTK receiver."]
14307    pub rtk_receiver_id: u8,
14308    #[doc = "GPS-specific health report for RTK data."]
14309    pub rtk_health: u8,
14310    #[doc = "Rate of baseline messages being received by GPS"]
14311    pub rtk_rate: u8,
14312    #[doc = "Current number of sats used for RTK calculation."]
14313    pub nsats: u8,
14314    #[doc = "Coordinate system of baseline"]
14315    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14316}
14317impl GPS2_RTK_DATA {
14318    pub const ENCODED_LEN: usize = 35usize;
14319    pub const DEFAULT: Self = Self {
14320        time_last_baseline_ms: 0_u32,
14321        tow: 0_u32,
14322        baseline_a_mm: 0_i32,
14323        baseline_b_mm: 0_i32,
14324        baseline_c_mm: 0_i32,
14325        accuracy: 0_u32,
14326        iar_num_hypotheses: 0_i32,
14327        wn: 0_u16,
14328        rtk_receiver_id: 0_u8,
14329        rtk_health: 0_u8,
14330        rtk_rate: 0_u8,
14331        nsats: 0_u8,
14332        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14333    };
14334    #[cfg(feature = "arbitrary")]
14335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14336        use arbitrary::{Arbitrary, Unstructured};
14337        let mut buf = [0u8; 1024];
14338        rng.fill_bytes(&mut buf);
14339        let mut unstructured = Unstructured::new(&buf);
14340        Self::arbitrary(&mut unstructured).unwrap_or_default()
14341    }
14342}
14343impl Default for GPS2_RTK_DATA {
14344    fn default() -> Self {
14345        Self::DEFAULT.clone()
14346    }
14347}
14348impl MessageData for GPS2_RTK_DATA {
14349    type Message = MavMessage;
14350    const ID: u32 = 128u32;
14351    const NAME: &'static str = "GPS2_RTK";
14352    const EXTRA_CRC: u8 = 226u8;
14353    const ENCODED_LEN: usize = 35usize;
14354    fn deser(
14355        _version: MavlinkVersion,
14356        __input: &[u8],
14357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14358        let avail_len = __input.len();
14359        let mut payload_buf = [0; Self::ENCODED_LEN];
14360        let mut buf = if avail_len < Self::ENCODED_LEN {
14361            payload_buf[0..avail_len].copy_from_slice(__input);
14362            Bytes::new(&payload_buf)
14363        } else {
14364            Bytes::new(__input)
14365        };
14366        let mut __struct = Self::default();
14367        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14368        __struct.tow = buf.get_u32_le()?;
14369        __struct.baseline_a_mm = buf.get_i32_le()?;
14370        __struct.baseline_b_mm = buf.get_i32_le()?;
14371        __struct.baseline_c_mm = buf.get_i32_le()?;
14372        __struct.accuracy = buf.get_u32_le()?;
14373        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14374        __struct.wn = buf.get_u16_le()?;
14375        __struct.rtk_receiver_id = buf.get_u8()?;
14376        __struct.rtk_health = buf.get_u8()?;
14377        __struct.rtk_rate = buf.get_u8()?;
14378        __struct.nsats = buf.get_u8()?;
14379        let tmp = buf.get_u8()?;
14380        __struct.baseline_coords_type =
14381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14382                enum_type: "RtkBaselineCoordinateSystem",
14383                value: tmp as u64,
14384            })?;
14385        Ok(__struct)
14386    }
14387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14388        let mut __tmp = BytesMut::new(bytes);
14389        #[allow(clippy::absurd_extreme_comparisons)]
14390        #[allow(unused_comparisons)]
14391        if __tmp.remaining() < Self::ENCODED_LEN {
14392            panic!(
14393                "buffer is too small (need {} bytes, but got {})",
14394                Self::ENCODED_LEN,
14395                __tmp.remaining(),
14396            )
14397        }
14398        __tmp.put_u32_le(self.time_last_baseline_ms);
14399        __tmp.put_u32_le(self.tow);
14400        __tmp.put_i32_le(self.baseline_a_mm);
14401        __tmp.put_i32_le(self.baseline_b_mm);
14402        __tmp.put_i32_le(self.baseline_c_mm);
14403        __tmp.put_u32_le(self.accuracy);
14404        __tmp.put_i32_le(self.iar_num_hypotheses);
14405        __tmp.put_u16_le(self.wn);
14406        __tmp.put_u8(self.rtk_receiver_id);
14407        __tmp.put_u8(self.rtk_health);
14408        __tmp.put_u8(self.rtk_rate);
14409        __tmp.put_u8(self.nsats);
14410        __tmp.put_u8(self.baseline_coords_type as u8);
14411        if matches!(version, MavlinkVersion::V2) {
14412            let len = __tmp.len();
14413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14414        } else {
14415            __tmp.len()
14416        }
14417    }
14418}
14419#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14420#[doc = ""]
14421#[doc = "ID: 49"]
14422#[derive(Debug, Clone, PartialEq)]
14423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14425#[cfg_attr(feature = "ts", derive(TS))]
14426#[cfg_attr(feature = "ts", ts(export))]
14427pub struct GPS_GLOBAL_ORIGIN_DATA {
14428    #[doc = "Latitude (WGS84)"]
14429    pub latitude: i32,
14430    #[doc = "Longitude (WGS84)"]
14431    pub longitude: i32,
14432    #[doc = "Altitude (MSL). Positive for up."]
14433    pub altitude: i32,
14434    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14436    pub time_usec: u64,
14437}
14438impl GPS_GLOBAL_ORIGIN_DATA {
14439    pub const ENCODED_LEN: usize = 20usize;
14440    pub const DEFAULT: Self = Self {
14441        latitude: 0_i32,
14442        longitude: 0_i32,
14443        altitude: 0_i32,
14444        time_usec: 0_u64,
14445    };
14446    #[cfg(feature = "arbitrary")]
14447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14448        use arbitrary::{Arbitrary, Unstructured};
14449        let mut buf = [0u8; 1024];
14450        rng.fill_bytes(&mut buf);
14451        let mut unstructured = Unstructured::new(&buf);
14452        Self::arbitrary(&mut unstructured).unwrap_or_default()
14453    }
14454}
14455impl Default for GPS_GLOBAL_ORIGIN_DATA {
14456    fn default() -> Self {
14457        Self::DEFAULT.clone()
14458    }
14459}
14460impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14461    type Message = MavMessage;
14462    const ID: u32 = 49u32;
14463    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14464    const EXTRA_CRC: u8 = 39u8;
14465    const ENCODED_LEN: usize = 20usize;
14466    fn deser(
14467        _version: MavlinkVersion,
14468        __input: &[u8],
14469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14470        let avail_len = __input.len();
14471        let mut payload_buf = [0; Self::ENCODED_LEN];
14472        let mut buf = if avail_len < Self::ENCODED_LEN {
14473            payload_buf[0..avail_len].copy_from_slice(__input);
14474            Bytes::new(&payload_buf)
14475        } else {
14476            Bytes::new(__input)
14477        };
14478        let mut __struct = Self::default();
14479        __struct.latitude = buf.get_i32_le()?;
14480        __struct.longitude = buf.get_i32_le()?;
14481        __struct.altitude = buf.get_i32_le()?;
14482        __struct.time_usec = buf.get_u64_le()?;
14483        Ok(__struct)
14484    }
14485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14486        let mut __tmp = BytesMut::new(bytes);
14487        #[allow(clippy::absurd_extreme_comparisons)]
14488        #[allow(unused_comparisons)]
14489        if __tmp.remaining() < Self::ENCODED_LEN {
14490            panic!(
14491                "buffer is too small (need {} bytes, but got {})",
14492                Self::ENCODED_LEN,
14493                __tmp.remaining(),
14494            )
14495        }
14496        __tmp.put_i32_le(self.latitude);
14497        __tmp.put_i32_le(self.longitude);
14498        __tmp.put_i32_le(self.altitude);
14499        if matches!(version, MavlinkVersion::V2) {
14500            __tmp.put_u64_le(self.time_usec);
14501            let len = __tmp.len();
14502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14503        } else {
14504            __tmp.len()
14505        }
14506    }
14507}
14508#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14509#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14510#[doc = ""]
14511#[doc = "ID: 123"]
14512#[derive(Debug, Clone, PartialEq)]
14513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14515#[cfg_attr(feature = "ts", derive(TS))]
14516#[cfg_attr(feature = "ts", ts(export))]
14517pub struct GPS_INJECT_DATA_DATA {
14518    #[doc = "System ID"]
14519    pub target_system: u8,
14520    #[doc = "Component ID"]
14521    pub target_component: u8,
14522    #[doc = "Data length"]
14523    pub len: u8,
14524    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14525    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14526    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14527    pub data: [u8; 110],
14528}
14529impl GPS_INJECT_DATA_DATA {
14530    pub const ENCODED_LEN: usize = 113usize;
14531    pub const DEFAULT: Self = Self {
14532        target_system: 0_u8,
14533        target_component: 0_u8,
14534        len: 0_u8,
14535        data: [0_u8; 110usize],
14536    };
14537    #[cfg(feature = "arbitrary")]
14538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14539        use arbitrary::{Arbitrary, Unstructured};
14540        let mut buf = [0u8; 1024];
14541        rng.fill_bytes(&mut buf);
14542        let mut unstructured = Unstructured::new(&buf);
14543        Self::arbitrary(&mut unstructured).unwrap_or_default()
14544    }
14545}
14546impl Default for GPS_INJECT_DATA_DATA {
14547    fn default() -> Self {
14548        Self::DEFAULT.clone()
14549    }
14550}
14551impl MessageData for GPS_INJECT_DATA_DATA {
14552    type Message = MavMessage;
14553    const ID: u32 = 123u32;
14554    const NAME: &'static str = "GPS_INJECT_DATA";
14555    const EXTRA_CRC: u8 = 250u8;
14556    const ENCODED_LEN: usize = 113usize;
14557    fn deser(
14558        _version: MavlinkVersion,
14559        __input: &[u8],
14560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14561        let avail_len = __input.len();
14562        let mut payload_buf = [0; Self::ENCODED_LEN];
14563        let mut buf = if avail_len < Self::ENCODED_LEN {
14564            payload_buf[0..avail_len].copy_from_slice(__input);
14565            Bytes::new(&payload_buf)
14566        } else {
14567            Bytes::new(__input)
14568        };
14569        let mut __struct = Self::default();
14570        __struct.target_system = buf.get_u8()?;
14571        __struct.target_component = buf.get_u8()?;
14572        __struct.len = buf.get_u8()?;
14573        for v in &mut __struct.data {
14574            let val = buf.get_u8()?;
14575            *v = val;
14576        }
14577        Ok(__struct)
14578    }
14579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14580        let mut __tmp = BytesMut::new(bytes);
14581        #[allow(clippy::absurd_extreme_comparisons)]
14582        #[allow(unused_comparisons)]
14583        if __tmp.remaining() < Self::ENCODED_LEN {
14584            panic!(
14585                "buffer is too small (need {} bytes, but got {})",
14586                Self::ENCODED_LEN,
14587                __tmp.remaining(),
14588            )
14589        }
14590        __tmp.put_u8(self.target_system);
14591        __tmp.put_u8(self.target_component);
14592        __tmp.put_u8(self.len);
14593        for val in &self.data {
14594            __tmp.put_u8(*val);
14595        }
14596        if matches!(version, MavlinkVersion::V2) {
14597            let len = __tmp.len();
14598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14599        } else {
14600            __tmp.len()
14601        }
14602    }
14603}
14604#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14605#[doc = ""]
14606#[doc = "ID: 232"]
14607#[derive(Debug, Clone, PartialEq)]
14608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14610#[cfg_attr(feature = "ts", derive(TS))]
14611#[cfg_attr(feature = "ts", ts(export))]
14612pub struct GPS_INPUT_DATA {
14613    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14614    pub time_usec: u64,
14615    #[doc = "GPS time (from start of GPS week)"]
14616    pub time_week_ms: u32,
14617    #[doc = "Latitude (WGS84)"]
14618    pub lat: i32,
14619    #[doc = "Longitude (WGS84)"]
14620    pub lon: i32,
14621    #[doc = "Altitude (MSL). Positive for up."]
14622    pub alt: f32,
14623    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14624    pub hdop: f32,
14625    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14626    pub vdop: f32,
14627    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14628    pub vn: f32,
14629    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14630    pub ve: f32,
14631    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14632    pub vd: f32,
14633    #[doc = "GPS speed accuracy"]
14634    pub speed_accuracy: f32,
14635    #[doc = "GPS horizontal accuracy"]
14636    pub horiz_accuracy: f32,
14637    #[doc = "GPS vertical accuracy"]
14638    pub vert_accuracy: f32,
14639    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14640    pub ignore_flags: GpsInputIgnoreFlags,
14641    #[doc = "GPS week number"]
14642    pub time_week: u16,
14643    #[doc = "ID of the GPS for multiple GPS inputs"]
14644    pub gps_id: u8,
14645    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14646    pub fix_type: u8,
14647    #[doc = "Number of satellites visible."]
14648    pub satellites_visible: u8,
14649    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14651    pub yaw: u16,
14652}
14653impl GPS_INPUT_DATA {
14654    pub const ENCODED_LEN: usize = 65usize;
14655    pub const DEFAULT: Self = Self {
14656        time_usec: 0_u64,
14657        time_week_ms: 0_u32,
14658        lat: 0_i32,
14659        lon: 0_i32,
14660        alt: 0.0_f32,
14661        hdop: 0.0_f32,
14662        vdop: 0.0_f32,
14663        vn: 0.0_f32,
14664        ve: 0.0_f32,
14665        vd: 0.0_f32,
14666        speed_accuracy: 0.0_f32,
14667        horiz_accuracy: 0.0_f32,
14668        vert_accuracy: 0.0_f32,
14669        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14670        time_week: 0_u16,
14671        gps_id: 0_u8,
14672        fix_type: 0_u8,
14673        satellites_visible: 0_u8,
14674        yaw: 0_u16,
14675    };
14676    #[cfg(feature = "arbitrary")]
14677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14678        use arbitrary::{Arbitrary, Unstructured};
14679        let mut buf = [0u8; 1024];
14680        rng.fill_bytes(&mut buf);
14681        let mut unstructured = Unstructured::new(&buf);
14682        Self::arbitrary(&mut unstructured).unwrap_or_default()
14683    }
14684}
14685impl Default for GPS_INPUT_DATA {
14686    fn default() -> Self {
14687        Self::DEFAULT.clone()
14688    }
14689}
14690impl MessageData for GPS_INPUT_DATA {
14691    type Message = MavMessage;
14692    const ID: u32 = 232u32;
14693    const NAME: &'static str = "GPS_INPUT";
14694    const EXTRA_CRC: u8 = 151u8;
14695    const ENCODED_LEN: usize = 65usize;
14696    fn deser(
14697        _version: MavlinkVersion,
14698        __input: &[u8],
14699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14700        let avail_len = __input.len();
14701        let mut payload_buf = [0; Self::ENCODED_LEN];
14702        let mut buf = if avail_len < Self::ENCODED_LEN {
14703            payload_buf[0..avail_len].copy_from_slice(__input);
14704            Bytes::new(&payload_buf)
14705        } else {
14706            Bytes::new(__input)
14707        };
14708        let mut __struct = Self::default();
14709        __struct.time_usec = buf.get_u64_le()?;
14710        __struct.time_week_ms = buf.get_u32_le()?;
14711        __struct.lat = buf.get_i32_le()?;
14712        __struct.lon = buf.get_i32_le()?;
14713        __struct.alt = buf.get_f32_le()?;
14714        __struct.hdop = buf.get_f32_le()?;
14715        __struct.vdop = buf.get_f32_le()?;
14716        __struct.vn = buf.get_f32_le()?;
14717        __struct.ve = buf.get_f32_le()?;
14718        __struct.vd = buf.get_f32_le()?;
14719        __struct.speed_accuracy = buf.get_f32_le()?;
14720        __struct.horiz_accuracy = buf.get_f32_le()?;
14721        __struct.vert_accuracy = buf.get_f32_le()?;
14722        let tmp = buf.get_u16_le()?;
14723        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14724            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14725        )
14726        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14727            flag_type: "GpsInputIgnoreFlags",
14728            value: tmp as u64,
14729        })?;
14730        __struct.time_week = buf.get_u16_le()?;
14731        __struct.gps_id = buf.get_u8()?;
14732        __struct.fix_type = buf.get_u8()?;
14733        __struct.satellites_visible = buf.get_u8()?;
14734        __struct.yaw = buf.get_u16_le()?;
14735        Ok(__struct)
14736    }
14737    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14738        let mut __tmp = BytesMut::new(bytes);
14739        #[allow(clippy::absurd_extreme_comparisons)]
14740        #[allow(unused_comparisons)]
14741        if __tmp.remaining() < Self::ENCODED_LEN {
14742            panic!(
14743                "buffer is too small (need {} bytes, but got {})",
14744                Self::ENCODED_LEN,
14745                __tmp.remaining(),
14746            )
14747        }
14748        __tmp.put_u64_le(self.time_usec);
14749        __tmp.put_u32_le(self.time_week_ms);
14750        __tmp.put_i32_le(self.lat);
14751        __tmp.put_i32_le(self.lon);
14752        __tmp.put_f32_le(self.alt);
14753        __tmp.put_f32_le(self.hdop);
14754        __tmp.put_f32_le(self.vdop);
14755        __tmp.put_f32_le(self.vn);
14756        __tmp.put_f32_le(self.ve);
14757        __tmp.put_f32_le(self.vd);
14758        __tmp.put_f32_le(self.speed_accuracy);
14759        __tmp.put_f32_le(self.horiz_accuracy);
14760        __tmp.put_f32_le(self.vert_accuracy);
14761        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14762        __tmp.put_u16_le(self.time_week);
14763        __tmp.put_u8(self.gps_id);
14764        __tmp.put_u8(self.fix_type);
14765        __tmp.put_u8(self.satellites_visible);
14766        if matches!(version, MavlinkVersion::V2) {
14767            __tmp.put_u16_le(self.yaw);
14768            let len = __tmp.len();
14769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14770        } else {
14771            __tmp.len()
14772        }
14773    }
14774}
14775#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14776#[doc = ""]
14777#[doc = "ID: 24"]
14778#[derive(Debug, Clone, PartialEq)]
14779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14781#[cfg_attr(feature = "ts", derive(TS))]
14782#[cfg_attr(feature = "ts", ts(export))]
14783pub struct GPS_RAW_INT_DATA {
14784    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14785    pub time_usec: u64,
14786    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14787    pub lat: i32,
14788    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14789    pub lon: i32,
14790    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14791    pub alt: i32,
14792    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14793    pub eph: u16,
14794    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14795    pub epv: u16,
14796    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14797    pub vel: u16,
14798    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14799    pub cog: u16,
14800    #[doc = "GPS fix type."]
14801    pub fix_type: GpsFixType,
14802    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14803    pub satellites_visible: u8,
14804    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14806    pub alt_ellipsoid: i32,
14807    #[doc = "Position uncertainty."]
14808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14809    pub h_acc: u32,
14810    #[doc = "Altitude uncertainty."]
14811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14812    pub v_acc: u32,
14813    #[doc = "Speed uncertainty."]
14814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14815    pub vel_acc: u32,
14816    #[doc = "Heading / track uncertainty"]
14817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14818    pub hdg_acc: u32,
14819    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14821    pub yaw: u16,
14822}
14823impl GPS_RAW_INT_DATA {
14824    pub const ENCODED_LEN: usize = 52usize;
14825    pub const DEFAULT: Self = Self {
14826        time_usec: 0_u64,
14827        lat: 0_i32,
14828        lon: 0_i32,
14829        alt: 0_i32,
14830        eph: 0_u16,
14831        epv: 0_u16,
14832        vel: 0_u16,
14833        cog: 0_u16,
14834        fix_type: GpsFixType::DEFAULT,
14835        satellites_visible: 0_u8,
14836        alt_ellipsoid: 0_i32,
14837        h_acc: 0_u32,
14838        v_acc: 0_u32,
14839        vel_acc: 0_u32,
14840        hdg_acc: 0_u32,
14841        yaw: 0_u16,
14842    };
14843    #[cfg(feature = "arbitrary")]
14844    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14845        use arbitrary::{Arbitrary, Unstructured};
14846        let mut buf = [0u8; 1024];
14847        rng.fill_bytes(&mut buf);
14848        let mut unstructured = Unstructured::new(&buf);
14849        Self::arbitrary(&mut unstructured).unwrap_or_default()
14850    }
14851}
14852impl Default for GPS_RAW_INT_DATA {
14853    fn default() -> Self {
14854        Self::DEFAULT.clone()
14855    }
14856}
14857impl MessageData for GPS_RAW_INT_DATA {
14858    type Message = MavMessage;
14859    const ID: u32 = 24u32;
14860    const NAME: &'static str = "GPS_RAW_INT";
14861    const EXTRA_CRC: u8 = 24u8;
14862    const ENCODED_LEN: usize = 52usize;
14863    fn deser(
14864        _version: MavlinkVersion,
14865        __input: &[u8],
14866    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14867        let avail_len = __input.len();
14868        let mut payload_buf = [0; Self::ENCODED_LEN];
14869        let mut buf = if avail_len < Self::ENCODED_LEN {
14870            payload_buf[0..avail_len].copy_from_slice(__input);
14871            Bytes::new(&payload_buf)
14872        } else {
14873            Bytes::new(__input)
14874        };
14875        let mut __struct = Self::default();
14876        __struct.time_usec = buf.get_u64_le()?;
14877        __struct.lat = buf.get_i32_le()?;
14878        __struct.lon = buf.get_i32_le()?;
14879        __struct.alt = buf.get_i32_le()?;
14880        __struct.eph = buf.get_u16_le()?;
14881        __struct.epv = buf.get_u16_le()?;
14882        __struct.vel = buf.get_u16_le()?;
14883        __struct.cog = buf.get_u16_le()?;
14884        let tmp = buf.get_u8()?;
14885        __struct.fix_type =
14886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14887                enum_type: "GpsFixType",
14888                value: tmp as u64,
14889            })?;
14890        __struct.satellites_visible = buf.get_u8()?;
14891        __struct.alt_ellipsoid = buf.get_i32_le()?;
14892        __struct.h_acc = buf.get_u32_le()?;
14893        __struct.v_acc = buf.get_u32_le()?;
14894        __struct.vel_acc = buf.get_u32_le()?;
14895        __struct.hdg_acc = buf.get_u32_le()?;
14896        __struct.yaw = buf.get_u16_le()?;
14897        Ok(__struct)
14898    }
14899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14900        let mut __tmp = BytesMut::new(bytes);
14901        #[allow(clippy::absurd_extreme_comparisons)]
14902        #[allow(unused_comparisons)]
14903        if __tmp.remaining() < Self::ENCODED_LEN {
14904            panic!(
14905                "buffer is too small (need {} bytes, but got {})",
14906                Self::ENCODED_LEN,
14907                __tmp.remaining(),
14908            )
14909        }
14910        __tmp.put_u64_le(self.time_usec);
14911        __tmp.put_i32_le(self.lat);
14912        __tmp.put_i32_le(self.lon);
14913        __tmp.put_i32_le(self.alt);
14914        __tmp.put_u16_le(self.eph);
14915        __tmp.put_u16_le(self.epv);
14916        __tmp.put_u16_le(self.vel);
14917        __tmp.put_u16_le(self.cog);
14918        __tmp.put_u8(self.fix_type as u8);
14919        __tmp.put_u8(self.satellites_visible);
14920        if matches!(version, MavlinkVersion::V2) {
14921            __tmp.put_i32_le(self.alt_ellipsoid);
14922            __tmp.put_u32_le(self.h_acc);
14923            __tmp.put_u32_le(self.v_acc);
14924            __tmp.put_u32_le(self.vel_acc);
14925            __tmp.put_u32_le(self.hdg_acc);
14926            __tmp.put_u16_le(self.yaw);
14927            let len = __tmp.len();
14928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14929        } else {
14930            __tmp.len()
14931        }
14932    }
14933}
14934#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14935#[doc = ""]
14936#[doc = "ID: 233"]
14937#[derive(Debug, Clone, PartialEq)]
14938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14940#[cfg_attr(feature = "ts", derive(TS))]
14941#[cfg_attr(feature = "ts", ts(export))]
14942pub struct GPS_RTCM_DATA_DATA {
14943    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14944    pub flags: u8,
14945    #[doc = "data length"]
14946    pub len: u8,
14947    #[doc = "RTCM message (may be fragmented)"]
14948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14950    pub data: [u8; 180],
14951}
14952impl GPS_RTCM_DATA_DATA {
14953    pub const ENCODED_LEN: usize = 182usize;
14954    pub const DEFAULT: Self = Self {
14955        flags: 0_u8,
14956        len: 0_u8,
14957        data: [0_u8; 180usize],
14958    };
14959    #[cfg(feature = "arbitrary")]
14960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14961        use arbitrary::{Arbitrary, Unstructured};
14962        let mut buf = [0u8; 1024];
14963        rng.fill_bytes(&mut buf);
14964        let mut unstructured = Unstructured::new(&buf);
14965        Self::arbitrary(&mut unstructured).unwrap_or_default()
14966    }
14967}
14968impl Default for GPS_RTCM_DATA_DATA {
14969    fn default() -> Self {
14970        Self::DEFAULT.clone()
14971    }
14972}
14973impl MessageData for GPS_RTCM_DATA_DATA {
14974    type Message = MavMessage;
14975    const ID: u32 = 233u32;
14976    const NAME: &'static str = "GPS_RTCM_DATA";
14977    const EXTRA_CRC: u8 = 35u8;
14978    const ENCODED_LEN: usize = 182usize;
14979    fn deser(
14980        _version: MavlinkVersion,
14981        __input: &[u8],
14982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14983        let avail_len = __input.len();
14984        let mut payload_buf = [0; Self::ENCODED_LEN];
14985        let mut buf = if avail_len < Self::ENCODED_LEN {
14986            payload_buf[0..avail_len].copy_from_slice(__input);
14987            Bytes::new(&payload_buf)
14988        } else {
14989            Bytes::new(__input)
14990        };
14991        let mut __struct = Self::default();
14992        __struct.flags = buf.get_u8()?;
14993        __struct.len = buf.get_u8()?;
14994        for v in &mut __struct.data {
14995            let val = buf.get_u8()?;
14996            *v = val;
14997        }
14998        Ok(__struct)
14999    }
15000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15001        let mut __tmp = BytesMut::new(bytes);
15002        #[allow(clippy::absurd_extreme_comparisons)]
15003        #[allow(unused_comparisons)]
15004        if __tmp.remaining() < Self::ENCODED_LEN {
15005            panic!(
15006                "buffer is too small (need {} bytes, but got {})",
15007                Self::ENCODED_LEN,
15008                __tmp.remaining(),
15009            )
15010        }
15011        __tmp.put_u8(self.flags);
15012        __tmp.put_u8(self.len);
15013        for val in &self.data {
15014            __tmp.put_u8(*val);
15015        }
15016        if matches!(version, MavlinkVersion::V2) {
15017            let len = __tmp.len();
15018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15019        } else {
15020            __tmp.len()
15021        }
15022    }
15023}
15024#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15025#[doc = ""]
15026#[doc = "ID: 127"]
15027#[derive(Debug, Clone, PartialEq)]
15028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15030#[cfg_attr(feature = "ts", derive(TS))]
15031#[cfg_attr(feature = "ts", ts(export))]
15032pub struct GPS_RTK_DATA {
15033    #[doc = "Time since boot of last baseline message received."]
15034    pub time_last_baseline_ms: u32,
15035    #[doc = "GPS Time of Week of last baseline"]
15036    pub tow: u32,
15037    #[doc = "Current baseline in ECEF x or NED north component."]
15038    pub baseline_a_mm: i32,
15039    #[doc = "Current baseline in ECEF y or NED east component."]
15040    pub baseline_b_mm: i32,
15041    #[doc = "Current baseline in ECEF z or NED down component."]
15042    pub baseline_c_mm: i32,
15043    #[doc = "Current estimate of baseline accuracy."]
15044    pub accuracy: u32,
15045    #[doc = "Current number of integer ambiguity hypotheses."]
15046    pub iar_num_hypotheses: i32,
15047    #[doc = "GPS Week Number of last baseline"]
15048    pub wn: u16,
15049    #[doc = "Identification of connected RTK receiver."]
15050    pub rtk_receiver_id: u8,
15051    #[doc = "GPS-specific health report for RTK data."]
15052    pub rtk_health: u8,
15053    #[doc = "Rate of baseline messages being received by GPS"]
15054    pub rtk_rate: u8,
15055    #[doc = "Current number of sats used for RTK calculation."]
15056    pub nsats: u8,
15057    #[doc = "Coordinate system of baseline"]
15058    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15059}
15060impl GPS_RTK_DATA {
15061    pub const ENCODED_LEN: usize = 35usize;
15062    pub const DEFAULT: Self = Self {
15063        time_last_baseline_ms: 0_u32,
15064        tow: 0_u32,
15065        baseline_a_mm: 0_i32,
15066        baseline_b_mm: 0_i32,
15067        baseline_c_mm: 0_i32,
15068        accuracy: 0_u32,
15069        iar_num_hypotheses: 0_i32,
15070        wn: 0_u16,
15071        rtk_receiver_id: 0_u8,
15072        rtk_health: 0_u8,
15073        rtk_rate: 0_u8,
15074        nsats: 0_u8,
15075        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15076    };
15077    #[cfg(feature = "arbitrary")]
15078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15079        use arbitrary::{Arbitrary, Unstructured};
15080        let mut buf = [0u8; 1024];
15081        rng.fill_bytes(&mut buf);
15082        let mut unstructured = Unstructured::new(&buf);
15083        Self::arbitrary(&mut unstructured).unwrap_or_default()
15084    }
15085}
15086impl Default for GPS_RTK_DATA {
15087    fn default() -> Self {
15088        Self::DEFAULT.clone()
15089    }
15090}
15091impl MessageData for GPS_RTK_DATA {
15092    type Message = MavMessage;
15093    const ID: u32 = 127u32;
15094    const NAME: &'static str = "GPS_RTK";
15095    const EXTRA_CRC: u8 = 25u8;
15096    const ENCODED_LEN: usize = 35usize;
15097    fn deser(
15098        _version: MavlinkVersion,
15099        __input: &[u8],
15100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15101        let avail_len = __input.len();
15102        let mut payload_buf = [0; Self::ENCODED_LEN];
15103        let mut buf = if avail_len < Self::ENCODED_LEN {
15104            payload_buf[0..avail_len].copy_from_slice(__input);
15105            Bytes::new(&payload_buf)
15106        } else {
15107            Bytes::new(__input)
15108        };
15109        let mut __struct = Self::default();
15110        __struct.time_last_baseline_ms = buf.get_u32_le()?;
15111        __struct.tow = buf.get_u32_le()?;
15112        __struct.baseline_a_mm = buf.get_i32_le()?;
15113        __struct.baseline_b_mm = buf.get_i32_le()?;
15114        __struct.baseline_c_mm = buf.get_i32_le()?;
15115        __struct.accuracy = buf.get_u32_le()?;
15116        __struct.iar_num_hypotheses = buf.get_i32_le()?;
15117        __struct.wn = buf.get_u16_le()?;
15118        __struct.rtk_receiver_id = buf.get_u8()?;
15119        __struct.rtk_health = buf.get_u8()?;
15120        __struct.rtk_rate = buf.get_u8()?;
15121        __struct.nsats = buf.get_u8()?;
15122        let tmp = buf.get_u8()?;
15123        __struct.baseline_coords_type =
15124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15125                enum_type: "RtkBaselineCoordinateSystem",
15126                value: tmp as u64,
15127            })?;
15128        Ok(__struct)
15129    }
15130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15131        let mut __tmp = BytesMut::new(bytes);
15132        #[allow(clippy::absurd_extreme_comparisons)]
15133        #[allow(unused_comparisons)]
15134        if __tmp.remaining() < Self::ENCODED_LEN {
15135            panic!(
15136                "buffer is too small (need {} bytes, but got {})",
15137                Self::ENCODED_LEN,
15138                __tmp.remaining(),
15139            )
15140        }
15141        __tmp.put_u32_le(self.time_last_baseline_ms);
15142        __tmp.put_u32_le(self.tow);
15143        __tmp.put_i32_le(self.baseline_a_mm);
15144        __tmp.put_i32_le(self.baseline_b_mm);
15145        __tmp.put_i32_le(self.baseline_c_mm);
15146        __tmp.put_u32_le(self.accuracy);
15147        __tmp.put_i32_le(self.iar_num_hypotheses);
15148        __tmp.put_u16_le(self.wn);
15149        __tmp.put_u8(self.rtk_receiver_id);
15150        __tmp.put_u8(self.rtk_health);
15151        __tmp.put_u8(self.rtk_rate);
15152        __tmp.put_u8(self.nsats);
15153        __tmp.put_u8(self.baseline_coords_type as u8);
15154        if matches!(version, MavlinkVersion::V2) {
15155            let len = __tmp.len();
15156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15157        } else {
15158            __tmp.len()
15159        }
15160    }
15161}
15162#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15163#[doc = ""]
15164#[doc = "ID: 25"]
15165#[derive(Debug, Clone, PartialEq)]
15166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15168#[cfg_attr(feature = "ts", derive(TS))]
15169#[cfg_attr(feature = "ts", ts(export))]
15170pub struct GPS_STATUS_DATA {
15171    #[doc = "Number of satellites visible"]
15172    pub satellites_visible: u8,
15173    #[doc = "Global satellite ID"]
15174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15176    pub satellite_prn: [u8; 20],
15177    #[doc = "0: Satellite not used, 1: used for localization"]
15178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15179    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15180    pub satellite_used: [u8; 20],
15181    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15182    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15183    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15184    pub satellite_elevation: [u8; 20],
15185    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15186    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15187    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15188    pub satellite_azimuth: [u8; 20],
15189    #[doc = "Signal to noise ratio of satellite"]
15190    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15191    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15192    pub satellite_snr: [u8; 20],
15193}
15194impl GPS_STATUS_DATA {
15195    pub const ENCODED_LEN: usize = 101usize;
15196    pub const DEFAULT: Self = Self {
15197        satellites_visible: 0_u8,
15198        satellite_prn: [0_u8; 20usize],
15199        satellite_used: [0_u8; 20usize],
15200        satellite_elevation: [0_u8; 20usize],
15201        satellite_azimuth: [0_u8; 20usize],
15202        satellite_snr: [0_u8; 20usize],
15203    };
15204    #[cfg(feature = "arbitrary")]
15205    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15206        use arbitrary::{Arbitrary, Unstructured};
15207        let mut buf = [0u8; 1024];
15208        rng.fill_bytes(&mut buf);
15209        let mut unstructured = Unstructured::new(&buf);
15210        Self::arbitrary(&mut unstructured).unwrap_or_default()
15211    }
15212}
15213impl Default for GPS_STATUS_DATA {
15214    fn default() -> Self {
15215        Self::DEFAULT.clone()
15216    }
15217}
15218impl MessageData for GPS_STATUS_DATA {
15219    type Message = MavMessage;
15220    const ID: u32 = 25u32;
15221    const NAME: &'static str = "GPS_STATUS";
15222    const EXTRA_CRC: u8 = 23u8;
15223    const ENCODED_LEN: usize = 101usize;
15224    fn deser(
15225        _version: MavlinkVersion,
15226        __input: &[u8],
15227    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15228        let avail_len = __input.len();
15229        let mut payload_buf = [0; Self::ENCODED_LEN];
15230        let mut buf = if avail_len < Self::ENCODED_LEN {
15231            payload_buf[0..avail_len].copy_from_slice(__input);
15232            Bytes::new(&payload_buf)
15233        } else {
15234            Bytes::new(__input)
15235        };
15236        let mut __struct = Self::default();
15237        __struct.satellites_visible = buf.get_u8()?;
15238        for v in &mut __struct.satellite_prn {
15239            let val = buf.get_u8()?;
15240            *v = val;
15241        }
15242        for v in &mut __struct.satellite_used {
15243            let val = buf.get_u8()?;
15244            *v = val;
15245        }
15246        for v in &mut __struct.satellite_elevation {
15247            let val = buf.get_u8()?;
15248            *v = val;
15249        }
15250        for v in &mut __struct.satellite_azimuth {
15251            let val = buf.get_u8()?;
15252            *v = val;
15253        }
15254        for v in &mut __struct.satellite_snr {
15255            let val = buf.get_u8()?;
15256            *v = val;
15257        }
15258        Ok(__struct)
15259    }
15260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15261        let mut __tmp = BytesMut::new(bytes);
15262        #[allow(clippy::absurd_extreme_comparisons)]
15263        #[allow(unused_comparisons)]
15264        if __tmp.remaining() < Self::ENCODED_LEN {
15265            panic!(
15266                "buffer is too small (need {} bytes, but got {})",
15267                Self::ENCODED_LEN,
15268                __tmp.remaining(),
15269            )
15270        }
15271        __tmp.put_u8(self.satellites_visible);
15272        for val in &self.satellite_prn {
15273            __tmp.put_u8(*val);
15274        }
15275        for val in &self.satellite_used {
15276            __tmp.put_u8(*val);
15277        }
15278        for val in &self.satellite_elevation {
15279            __tmp.put_u8(*val);
15280        }
15281        for val in &self.satellite_azimuth {
15282            __tmp.put_u8(*val);
15283        }
15284        for val in &self.satellite_snr {
15285            __tmp.put_u8(*val);
15286        }
15287        if matches!(version, MavlinkVersion::V2) {
15288            let len = __tmp.len();
15289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15290        } else {
15291            __tmp.len()
15292        }
15293    }
15294}
15295#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15296#[doc = ""]
15297#[doc = "ID: 0"]
15298#[derive(Debug, Clone, PartialEq)]
15299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15301#[cfg_attr(feature = "ts", derive(TS))]
15302#[cfg_attr(feature = "ts", ts(export))]
15303pub struct HEARTBEAT_DATA {
15304    #[doc = "A bitfield for use for autopilot-specific flags"]
15305    pub custom_mode: u32,
15306    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15307    pub mavtype: MavType,
15308    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15309    pub autopilot: MavAutopilot,
15310    #[doc = "System mode bitmap."]
15311    pub base_mode: MavModeFlag,
15312    #[doc = "System status flag."]
15313    pub system_status: MavState,
15314    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15315    pub mavlink_version: u8,
15316}
15317impl HEARTBEAT_DATA {
15318    pub const ENCODED_LEN: usize = 9usize;
15319    pub const DEFAULT: Self = Self {
15320        custom_mode: 0_u32,
15321        mavtype: MavType::DEFAULT,
15322        autopilot: MavAutopilot::DEFAULT,
15323        base_mode: MavModeFlag::DEFAULT,
15324        system_status: MavState::DEFAULT,
15325        mavlink_version: MINOR_MAVLINK_VERSION,
15326    };
15327    #[cfg(feature = "arbitrary")]
15328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15329        use arbitrary::{Arbitrary, Unstructured};
15330        let mut buf = [0u8; 1024];
15331        rng.fill_bytes(&mut buf);
15332        let mut unstructured = Unstructured::new(&buf);
15333        Self::arbitrary(&mut unstructured).unwrap_or_default()
15334    }
15335}
15336impl Default for HEARTBEAT_DATA {
15337    fn default() -> Self {
15338        Self::DEFAULT.clone()
15339    }
15340}
15341impl MessageData for HEARTBEAT_DATA {
15342    type Message = MavMessage;
15343    const ID: u32 = 0u32;
15344    const NAME: &'static str = "HEARTBEAT";
15345    const EXTRA_CRC: u8 = 50u8;
15346    const ENCODED_LEN: usize = 9usize;
15347    fn deser(
15348        _version: MavlinkVersion,
15349        __input: &[u8],
15350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15351        let avail_len = __input.len();
15352        let mut payload_buf = [0; Self::ENCODED_LEN];
15353        let mut buf = if avail_len < Self::ENCODED_LEN {
15354            payload_buf[0..avail_len].copy_from_slice(__input);
15355            Bytes::new(&payload_buf)
15356        } else {
15357            Bytes::new(__input)
15358        };
15359        let mut __struct = Self::default();
15360        __struct.custom_mode = buf.get_u32_le()?;
15361        let tmp = buf.get_u8()?;
15362        __struct.mavtype =
15363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15364                enum_type: "MavType",
15365                value: tmp as u64,
15366            })?;
15367        let tmp = buf.get_u8()?;
15368        __struct.autopilot =
15369            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15370                enum_type: "MavAutopilot",
15371                value: tmp as u64,
15372            })?;
15373        let tmp = buf.get_u8()?;
15374        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15375            ::mavlink_core::error::ParserError::InvalidFlag {
15376                flag_type: "MavModeFlag",
15377                value: tmp as u64,
15378            },
15379        )?;
15380        let tmp = buf.get_u8()?;
15381        __struct.system_status =
15382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15383                enum_type: "MavState",
15384                value: tmp as u64,
15385            })?;
15386        __struct.mavlink_version = buf.get_u8()?;
15387        Ok(__struct)
15388    }
15389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15390        let mut __tmp = BytesMut::new(bytes);
15391        #[allow(clippy::absurd_extreme_comparisons)]
15392        #[allow(unused_comparisons)]
15393        if __tmp.remaining() < Self::ENCODED_LEN {
15394            panic!(
15395                "buffer is too small (need {} bytes, but got {})",
15396                Self::ENCODED_LEN,
15397                __tmp.remaining(),
15398            )
15399        }
15400        __tmp.put_u32_le(self.custom_mode);
15401        __tmp.put_u8(self.mavtype as u8);
15402        __tmp.put_u8(self.autopilot as u8);
15403        __tmp.put_u8(self.base_mode.bits() as u8);
15404        __tmp.put_u8(self.system_status as u8);
15405        __tmp.put_u8(self.mavlink_version);
15406        if matches!(version, MavlinkVersion::V2) {
15407            let len = __tmp.len();
15408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15409        } else {
15410            __tmp.len()
15411        }
15412    }
15413}
15414#[doc = "The IMU readings in SI units in NED body frame."]
15415#[doc = ""]
15416#[doc = "ID: 105"]
15417#[derive(Debug, Clone, PartialEq)]
15418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15420#[cfg_attr(feature = "ts", derive(TS))]
15421#[cfg_attr(feature = "ts", ts(export))]
15422pub struct HIGHRES_IMU_DATA {
15423    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15424    pub time_usec: u64,
15425    #[doc = "X acceleration"]
15426    pub xacc: f32,
15427    #[doc = "Y acceleration"]
15428    pub yacc: f32,
15429    #[doc = "Z acceleration"]
15430    pub zacc: f32,
15431    #[doc = "Angular speed around X axis"]
15432    pub xgyro: f32,
15433    #[doc = "Angular speed around Y axis"]
15434    pub ygyro: f32,
15435    #[doc = "Angular speed around Z axis"]
15436    pub zgyro: f32,
15437    #[doc = "X Magnetic field"]
15438    pub xmag: f32,
15439    #[doc = "Y Magnetic field"]
15440    pub ymag: f32,
15441    #[doc = "Z Magnetic field"]
15442    pub zmag: f32,
15443    #[doc = "Absolute pressure"]
15444    pub abs_pressure: f32,
15445    #[doc = "Differential pressure"]
15446    pub diff_pressure: f32,
15447    #[doc = "Altitude calculated from pressure"]
15448    pub pressure_alt: f32,
15449    #[doc = "Temperature"]
15450    pub temperature: f32,
15451    #[doc = "Bitmap for fields that have updated since last message"]
15452    pub fields_updated: HighresImuUpdatedFlags,
15453    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15454    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15455    pub id: u8,
15456}
15457impl HIGHRES_IMU_DATA {
15458    pub const ENCODED_LEN: usize = 63usize;
15459    pub const DEFAULT: Self = Self {
15460        time_usec: 0_u64,
15461        xacc: 0.0_f32,
15462        yacc: 0.0_f32,
15463        zacc: 0.0_f32,
15464        xgyro: 0.0_f32,
15465        ygyro: 0.0_f32,
15466        zgyro: 0.0_f32,
15467        xmag: 0.0_f32,
15468        ymag: 0.0_f32,
15469        zmag: 0.0_f32,
15470        abs_pressure: 0.0_f32,
15471        diff_pressure: 0.0_f32,
15472        pressure_alt: 0.0_f32,
15473        temperature: 0.0_f32,
15474        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15475        id: 0_u8,
15476    };
15477    #[cfg(feature = "arbitrary")]
15478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15479        use arbitrary::{Arbitrary, Unstructured};
15480        let mut buf = [0u8; 1024];
15481        rng.fill_bytes(&mut buf);
15482        let mut unstructured = Unstructured::new(&buf);
15483        Self::arbitrary(&mut unstructured).unwrap_or_default()
15484    }
15485}
15486impl Default for HIGHRES_IMU_DATA {
15487    fn default() -> Self {
15488        Self::DEFAULT.clone()
15489    }
15490}
15491impl MessageData for HIGHRES_IMU_DATA {
15492    type Message = MavMessage;
15493    const ID: u32 = 105u32;
15494    const NAME: &'static str = "HIGHRES_IMU";
15495    const EXTRA_CRC: u8 = 93u8;
15496    const ENCODED_LEN: usize = 63usize;
15497    fn deser(
15498        _version: MavlinkVersion,
15499        __input: &[u8],
15500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15501        let avail_len = __input.len();
15502        let mut payload_buf = [0; Self::ENCODED_LEN];
15503        let mut buf = if avail_len < Self::ENCODED_LEN {
15504            payload_buf[0..avail_len].copy_from_slice(__input);
15505            Bytes::new(&payload_buf)
15506        } else {
15507            Bytes::new(__input)
15508        };
15509        let mut __struct = Self::default();
15510        __struct.time_usec = buf.get_u64_le()?;
15511        __struct.xacc = buf.get_f32_le()?;
15512        __struct.yacc = buf.get_f32_le()?;
15513        __struct.zacc = buf.get_f32_le()?;
15514        __struct.xgyro = buf.get_f32_le()?;
15515        __struct.ygyro = buf.get_f32_le()?;
15516        __struct.zgyro = buf.get_f32_le()?;
15517        __struct.xmag = buf.get_f32_le()?;
15518        __struct.ymag = buf.get_f32_le()?;
15519        __struct.zmag = buf.get_f32_le()?;
15520        __struct.abs_pressure = buf.get_f32_le()?;
15521        __struct.diff_pressure = buf.get_f32_le()?;
15522        __struct.pressure_alt = buf.get_f32_le()?;
15523        __struct.temperature = buf.get_f32_le()?;
15524        let tmp = buf.get_u16_le()?;
15525        __struct.fields_updated =
15526            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15527                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15528                    flag_type: "HighresImuUpdatedFlags",
15529                    value: tmp as u64,
15530                })?;
15531        __struct.id = buf.get_u8()?;
15532        Ok(__struct)
15533    }
15534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15535        let mut __tmp = BytesMut::new(bytes);
15536        #[allow(clippy::absurd_extreme_comparisons)]
15537        #[allow(unused_comparisons)]
15538        if __tmp.remaining() < Self::ENCODED_LEN {
15539            panic!(
15540                "buffer is too small (need {} bytes, but got {})",
15541                Self::ENCODED_LEN,
15542                __tmp.remaining(),
15543            )
15544        }
15545        __tmp.put_u64_le(self.time_usec);
15546        __tmp.put_f32_le(self.xacc);
15547        __tmp.put_f32_le(self.yacc);
15548        __tmp.put_f32_le(self.zacc);
15549        __tmp.put_f32_le(self.xgyro);
15550        __tmp.put_f32_le(self.ygyro);
15551        __tmp.put_f32_le(self.zgyro);
15552        __tmp.put_f32_le(self.xmag);
15553        __tmp.put_f32_le(self.ymag);
15554        __tmp.put_f32_le(self.zmag);
15555        __tmp.put_f32_le(self.abs_pressure);
15556        __tmp.put_f32_le(self.diff_pressure);
15557        __tmp.put_f32_le(self.pressure_alt);
15558        __tmp.put_f32_le(self.temperature);
15559        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15560        if matches!(version, MavlinkVersion::V2) {
15561            __tmp.put_u8(self.id);
15562            let len = __tmp.len();
15563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15564        } else {
15565            __tmp.len()
15566        }
15567    }
15568}
15569#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15570#[doc = "Message appropriate for high latency connections like Iridium."]
15571#[doc = ""]
15572#[doc = "ID: 234"]
15573#[derive(Debug, Clone, PartialEq)]
15574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15576#[cfg_attr(feature = "ts", derive(TS))]
15577#[cfg_attr(feature = "ts", ts(export))]
15578pub struct HIGH_LATENCY_DATA {
15579    #[doc = "A bitfield for use for autopilot-specific flags."]
15580    pub custom_mode: u32,
15581    #[doc = "Latitude"]
15582    pub latitude: i32,
15583    #[doc = "Longitude"]
15584    pub longitude: i32,
15585    #[doc = "roll"]
15586    pub roll: i16,
15587    #[doc = "pitch"]
15588    pub pitch: i16,
15589    #[doc = "heading"]
15590    pub heading: u16,
15591    #[doc = "heading setpoint"]
15592    pub heading_sp: i16,
15593    #[doc = "Altitude above mean sea level"]
15594    pub altitude_amsl: i16,
15595    #[doc = "Altitude setpoint relative to the home position"]
15596    pub altitude_sp: i16,
15597    #[doc = "distance to target"]
15598    pub wp_distance: u16,
15599    #[doc = "Bitmap of enabled system modes."]
15600    pub base_mode: MavModeFlag,
15601    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15602    pub landed_state: MavLandedState,
15603    #[doc = "throttle (percentage)"]
15604    pub throttle: i8,
15605    #[doc = "airspeed"]
15606    pub airspeed: u8,
15607    #[doc = "airspeed setpoint"]
15608    pub airspeed_sp: u8,
15609    #[doc = "groundspeed"]
15610    pub groundspeed: u8,
15611    #[doc = "climb rate"]
15612    pub climb_rate: i8,
15613    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15614    pub gps_nsat: u8,
15615    #[doc = "GPS Fix type."]
15616    pub gps_fix_type: GpsFixType,
15617    #[doc = "Remaining battery (percentage)"]
15618    pub battery_remaining: u8,
15619    #[doc = "Autopilot temperature (degrees C)"]
15620    pub temperature: i8,
15621    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15622    pub temperature_air: i8,
15623    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15624    pub failsafe: u8,
15625    #[doc = "current waypoint number"]
15626    pub wp_num: u8,
15627}
15628impl HIGH_LATENCY_DATA {
15629    pub const ENCODED_LEN: usize = 40usize;
15630    pub const DEFAULT: Self = Self {
15631        custom_mode: 0_u32,
15632        latitude: 0_i32,
15633        longitude: 0_i32,
15634        roll: 0_i16,
15635        pitch: 0_i16,
15636        heading: 0_u16,
15637        heading_sp: 0_i16,
15638        altitude_amsl: 0_i16,
15639        altitude_sp: 0_i16,
15640        wp_distance: 0_u16,
15641        base_mode: MavModeFlag::DEFAULT,
15642        landed_state: MavLandedState::DEFAULT,
15643        throttle: 0_i8,
15644        airspeed: 0_u8,
15645        airspeed_sp: 0_u8,
15646        groundspeed: 0_u8,
15647        climb_rate: 0_i8,
15648        gps_nsat: 0_u8,
15649        gps_fix_type: GpsFixType::DEFAULT,
15650        battery_remaining: 0_u8,
15651        temperature: 0_i8,
15652        temperature_air: 0_i8,
15653        failsafe: 0_u8,
15654        wp_num: 0_u8,
15655    };
15656    #[cfg(feature = "arbitrary")]
15657    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15658        use arbitrary::{Arbitrary, Unstructured};
15659        let mut buf = [0u8; 1024];
15660        rng.fill_bytes(&mut buf);
15661        let mut unstructured = Unstructured::new(&buf);
15662        Self::arbitrary(&mut unstructured).unwrap_or_default()
15663    }
15664}
15665impl Default for HIGH_LATENCY_DATA {
15666    fn default() -> Self {
15667        Self::DEFAULT.clone()
15668    }
15669}
15670impl MessageData for HIGH_LATENCY_DATA {
15671    type Message = MavMessage;
15672    const ID: u32 = 234u32;
15673    const NAME: &'static str = "HIGH_LATENCY";
15674    const EXTRA_CRC: u8 = 150u8;
15675    const ENCODED_LEN: usize = 40usize;
15676    fn deser(
15677        _version: MavlinkVersion,
15678        __input: &[u8],
15679    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15680        let avail_len = __input.len();
15681        let mut payload_buf = [0; Self::ENCODED_LEN];
15682        let mut buf = if avail_len < Self::ENCODED_LEN {
15683            payload_buf[0..avail_len].copy_from_slice(__input);
15684            Bytes::new(&payload_buf)
15685        } else {
15686            Bytes::new(__input)
15687        };
15688        let mut __struct = Self::default();
15689        __struct.custom_mode = buf.get_u32_le()?;
15690        __struct.latitude = buf.get_i32_le()?;
15691        __struct.longitude = buf.get_i32_le()?;
15692        __struct.roll = buf.get_i16_le()?;
15693        __struct.pitch = buf.get_i16_le()?;
15694        __struct.heading = buf.get_u16_le()?;
15695        __struct.heading_sp = buf.get_i16_le()?;
15696        __struct.altitude_amsl = buf.get_i16_le()?;
15697        __struct.altitude_sp = buf.get_i16_le()?;
15698        __struct.wp_distance = buf.get_u16_le()?;
15699        let tmp = buf.get_u8()?;
15700        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15701            ::mavlink_core::error::ParserError::InvalidFlag {
15702                flag_type: "MavModeFlag",
15703                value: tmp as u64,
15704            },
15705        )?;
15706        let tmp = buf.get_u8()?;
15707        __struct.landed_state =
15708            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15709                enum_type: "MavLandedState",
15710                value: tmp as u64,
15711            })?;
15712        __struct.throttle = buf.get_i8()?;
15713        __struct.airspeed = buf.get_u8()?;
15714        __struct.airspeed_sp = buf.get_u8()?;
15715        __struct.groundspeed = buf.get_u8()?;
15716        __struct.climb_rate = buf.get_i8()?;
15717        __struct.gps_nsat = buf.get_u8()?;
15718        let tmp = buf.get_u8()?;
15719        __struct.gps_fix_type =
15720            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15721                enum_type: "GpsFixType",
15722                value: tmp as u64,
15723            })?;
15724        __struct.battery_remaining = buf.get_u8()?;
15725        __struct.temperature = buf.get_i8()?;
15726        __struct.temperature_air = buf.get_i8()?;
15727        __struct.failsafe = buf.get_u8()?;
15728        __struct.wp_num = buf.get_u8()?;
15729        Ok(__struct)
15730    }
15731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15732        let mut __tmp = BytesMut::new(bytes);
15733        #[allow(clippy::absurd_extreme_comparisons)]
15734        #[allow(unused_comparisons)]
15735        if __tmp.remaining() < Self::ENCODED_LEN {
15736            panic!(
15737                "buffer is too small (need {} bytes, but got {})",
15738                Self::ENCODED_LEN,
15739                __tmp.remaining(),
15740            )
15741        }
15742        __tmp.put_u32_le(self.custom_mode);
15743        __tmp.put_i32_le(self.latitude);
15744        __tmp.put_i32_le(self.longitude);
15745        __tmp.put_i16_le(self.roll);
15746        __tmp.put_i16_le(self.pitch);
15747        __tmp.put_u16_le(self.heading);
15748        __tmp.put_i16_le(self.heading_sp);
15749        __tmp.put_i16_le(self.altitude_amsl);
15750        __tmp.put_i16_le(self.altitude_sp);
15751        __tmp.put_u16_le(self.wp_distance);
15752        __tmp.put_u8(self.base_mode.bits() as u8);
15753        __tmp.put_u8(self.landed_state as u8);
15754        __tmp.put_i8(self.throttle);
15755        __tmp.put_u8(self.airspeed);
15756        __tmp.put_u8(self.airspeed_sp);
15757        __tmp.put_u8(self.groundspeed);
15758        __tmp.put_i8(self.climb_rate);
15759        __tmp.put_u8(self.gps_nsat);
15760        __tmp.put_u8(self.gps_fix_type as u8);
15761        __tmp.put_u8(self.battery_remaining);
15762        __tmp.put_i8(self.temperature);
15763        __tmp.put_i8(self.temperature_air);
15764        __tmp.put_u8(self.failsafe);
15765        __tmp.put_u8(self.wp_num);
15766        if matches!(version, MavlinkVersion::V2) {
15767            let len = __tmp.len();
15768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15769        } else {
15770            __tmp.len()
15771        }
15772    }
15773}
15774#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15775#[doc = ""]
15776#[doc = "ID: 235"]
15777#[derive(Debug, Clone, PartialEq)]
15778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15780#[cfg_attr(feature = "ts", derive(TS))]
15781#[cfg_attr(feature = "ts", ts(export))]
15782pub struct HIGH_LATENCY2_DATA {
15783    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15784    pub timestamp: u32,
15785    #[doc = "Latitude"]
15786    pub latitude: i32,
15787    #[doc = "Longitude"]
15788    pub longitude: i32,
15789    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15790    pub custom_mode: u16,
15791    #[doc = "Altitude above mean sea level"]
15792    pub altitude: i16,
15793    #[doc = "Altitude setpoint"]
15794    pub target_altitude: i16,
15795    #[doc = "Distance to target waypoint or position"]
15796    pub target_distance: u16,
15797    #[doc = "Current waypoint number"]
15798    pub wp_num: u16,
15799    #[doc = "Bitmap of failure flags."]
15800    pub failure_flags: HlFailureFlag,
15801    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15802    pub mavtype: MavType,
15803    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15804    pub autopilot: MavAutopilot,
15805    #[doc = "Heading"]
15806    pub heading: u8,
15807    #[doc = "Heading setpoint"]
15808    pub target_heading: u8,
15809    #[doc = "Throttle"]
15810    pub throttle: u8,
15811    #[doc = "Airspeed"]
15812    pub airspeed: u8,
15813    #[doc = "Airspeed setpoint"]
15814    pub airspeed_sp: u8,
15815    #[doc = "Groundspeed"]
15816    pub groundspeed: u8,
15817    #[doc = "Windspeed"]
15818    pub windspeed: u8,
15819    #[doc = "Wind heading"]
15820    pub wind_heading: u8,
15821    #[doc = "Maximum error horizontal position since last message"]
15822    pub eph: u8,
15823    #[doc = "Maximum error vertical position since last message"]
15824    pub epv: u8,
15825    #[doc = "Air temperature"]
15826    pub temperature_air: i8,
15827    #[doc = "Maximum climb rate magnitude since last message"]
15828    pub climb_rate: i8,
15829    #[doc = "Battery level (-1 if field not provided)."]
15830    pub battery: i8,
15831    #[doc = "Field for custom payload."]
15832    pub custom0: i8,
15833    #[doc = "Field for custom payload."]
15834    pub custom1: i8,
15835    #[doc = "Field for custom payload."]
15836    pub custom2: i8,
15837}
15838impl HIGH_LATENCY2_DATA {
15839    pub const ENCODED_LEN: usize = 42usize;
15840    pub const DEFAULT: Self = Self {
15841        timestamp: 0_u32,
15842        latitude: 0_i32,
15843        longitude: 0_i32,
15844        custom_mode: 0_u16,
15845        altitude: 0_i16,
15846        target_altitude: 0_i16,
15847        target_distance: 0_u16,
15848        wp_num: 0_u16,
15849        failure_flags: HlFailureFlag::DEFAULT,
15850        mavtype: MavType::DEFAULT,
15851        autopilot: MavAutopilot::DEFAULT,
15852        heading: 0_u8,
15853        target_heading: 0_u8,
15854        throttle: 0_u8,
15855        airspeed: 0_u8,
15856        airspeed_sp: 0_u8,
15857        groundspeed: 0_u8,
15858        windspeed: 0_u8,
15859        wind_heading: 0_u8,
15860        eph: 0_u8,
15861        epv: 0_u8,
15862        temperature_air: 0_i8,
15863        climb_rate: 0_i8,
15864        battery: 0_i8,
15865        custom0: 0_i8,
15866        custom1: 0_i8,
15867        custom2: 0_i8,
15868    };
15869    #[cfg(feature = "arbitrary")]
15870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15871        use arbitrary::{Arbitrary, Unstructured};
15872        let mut buf = [0u8; 1024];
15873        rng.fill_bytes(&mut buf);
15874        let mut unstructured = Unstructured::new(&buf);
15875        Self::arbitrary(&mut unstructured).unwrap_or_default()
15876    }
15877}
15878impl Default for HIGH_LATENCY2_DATA {
15879    fn default() -> Self {
15880        Self::DEFAULT.clone()
15881    }
15882}
15883impl MessageData for HIGH_LATENCY2_DATA {
15884    type Message = MavMessage;
15885    const ID: u32 = 235u32;
15886    const NAME: &'static str = "HIGH_LATENCY2";
15887    const EXTRA_CRC: u8 = 179u8;
15888    const ENCODED_LEN: usize = 42usize;
15889    fn deser(
15890        _version: MavlinkVersion,
15891        __input: &[u8],
15892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15893        let avail_len = __input.len();
15894        let mut payload_buf = [0; Self::ENCODED_LEN];
15895        let mut buf = if avail_len < Self::ENCODED_LEN {
15896            payload_buf[0..avail_len].copy_from_slice(__input);
15897            Bytes::new(&payload_buf)
15898        } else {
15899            Bytes::new(__input)
15900        };
15901        let mut __struct = Self::default();
15902        __struct.timestamp = buf.get_u32_le()?;
15903        __struct.latitude = buf.get_i32_le()?;
15904        __struct.longitude = buf.get_i32_le()?;
15905        __struct.custom_mode = buf.get_u16_le()?;
15906        __struct.altitude = buf.get_i16_le()?;
15907        __struct.target_altitude = buf.get_i16_le()?;
15908        __struct.target_distance = buf.get_u16_le()?;
15909        __struct.wp_num = buf.get_u16_le()?;
15910        let tmp = buf.get_u16_le()?;
15911        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15912            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15913                flag_type: "HlFailureFlag",
15914                value: tmp as u64,
15915            })?;
15916        let tmp = buf.get_u8()?;
15917        __struct.mavtype =
15918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15919                enum_type: "MavType",
15920                value: tmp as u64,
15921            })?;
15922        let tmp = buf.get_u8()?;
15923        __struct.autopilot =
15924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15925                enum_type: "MavAutopilot",
15926                value: tmp as u64,
15927            })?;
15928        __struct.heading = buf.get_u8()?;
15929        __struct.target_heading = buf.get_u8()?;
15930        __struct.throttle = buf.get_u8()?;
15931        __struct.airspeed = buf.get_u8()?;
15932        __struct.airspeed_sp = buf.get_u8()?;
15933        __struct.groundspeed = buf.get_u8()?;
15934        __struct.windspeed = buf.get_u8()?;
15935        __struct.wind_heading = buf.get_u8()?;
15936        __struct.eph = buf.get_u8()?;
15937        __struct.epv = buf.get_u8()?;
15938        __struct.temperature_air = buf.get_i8()?;
15939        __struct.climb_rate = buf.get_i8()?;
15940        __struct.battery = buf.get_i8()?;
15941        __struct.custom0 = buf.get_i8()?;
15942        __struct.custom1 = buf.get_i8()?;
15943        __struct.custom2 = buf.get_i8()?;
15944        Ok(__struct)
15945    }
15946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15947        let mut __tmp = BytesMut::new(bytes);
15948        #[allow(clippy::absurd_extreme_comparisons)]
15949        #[allow(unused_comparisons)]
15950        if __tmp.remaining() < Self::ENCODED_LEN {
15951            panic!(
15952                "buffer is too small (need {} bytes, but got {})",
15953                Self::ENCODED_LEN,
15954                __tmp.remaining(),
15955            )
15956        }
15957        __tmp.put_u32_le(self.timestamp);
15958        __tmp.put_i32_le(self.latitude);
15959        __tmp.put_i32_le(self.longitude);
15960        __tmp.put_u16_le(self.custom_mode);
15961        __tmp.put_i16_le(self.altitude);
15962        __tmp.put_i16_le(self.target_altitude);
15963        __tmp.put_u16_le(self.target_distance);
15964        __tmp.put_u16_le(self.wp_num);
15965        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15966        __tmp.put_u8(self.mavtype as u8);
15967        __tmp.put_u8(self.autopilot as u8);
15968        __tmp.put_u8(self.heading);
15969        __tmp.put_u8(self.target_heading);
15970        __tmp.put_u8(self.throttle);
15971        __tmp.put_u8(self.airspeed);
15972        __tmp.put_u8(self.airspeed_sp);
15973        __tmp.put_u8(self.groundspeed);
15974        __tmp.put_u8(self.windspeed);
15975        __tmp.put_u8(self.wind_heading);
15976        __tmp.put_u8(self.eph);
15977        __tmp.put_u8(self.epv);
15978        __tmp.put_i8(self.temperature_air);
15979        __tmp.put_i8(self.climb_rate);
15980        __tmp.put_i8(self.battery);
15981        __tmp.put_i8(self.custom0);
15982        __tmp.put_i8(self.custom1);
15983        __tmp.put_i8(self.custom2);
15984        if matches!(version, MavlinkVersion::V2) {
15985            let len = __tmp.len();
15986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15987        } else {
15988            __tmp.len()
15989        }
15990    }
15991}
15992#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15993#[doc = ""]
15994#[doc = "ID: 93"]
15995#[derive(Debug, Clone, PartialEq)]
15996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15998#[cfg_attr(feature = "ts", derive(TS))]
15999#[cfg_attr(feature = "ts", ts(export))]
16000pub struct HIL_ACTUATOR_CONTROLS_DATA {
16001    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16002    pub time_usec: u64,
16003    #[doc = "Flags bitmask."]
16004    pub flags: HilActuatorControlsFlags,
16005    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16008    pub controls: [f32; 16],
16009    #[doc = "System mode. Includes arming state."]
16010    pub mode: MavModeFlag,
16011}
16012impl HIL_ACTUATOR_CONTROLS_DATA {
16013    pub const ENCODED_LEN: usize = 81usize;
16014    pub const DEFAULT: Self = Self {
16015        time_usec: 0_u64,
16016        flags: HilActuatorControlsFlags::DEFAULT,
16017        controls: [0.0_f32; 16usize],
16018        mode: MavModeFlag::DEFAULT,
16019    };
16020    #[cfg(feature = "arbitrary")]
16021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16022        use arbitrary::{Arbitrary, Unstructured};
16023        let mut buf = [0u8; 1024];
16024        rng.fill_bytes(&mut buf);
16025        let mut unstructured = Unstructured::new(&buf);
16026        Self::arbitrary(&mut unstructured).unwrap_or_default()
16027    }
16028}
16029impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16030    fn default() -> Self {
16031        Self::DEFAULT.clone()
16032    }
16033}
16034impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16035    type Message = MavMessage;
16036    const ID: u32 = 93u32;
16037    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16038    const EXTRA_CRC: u8 = 47u8;
16039    const ENCODED_LEN: usize = 81usize;
16040    fn deser(
16041        _version: MavlinkVersion,
16042        __input: &[u8],
16043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16044        let avail_len = __input.len();
16045        let mut payload_buf = [0; Self::ENCODED_LEN];
16046        let mut buf = if avail_len < Self::ENCODED_LEN {
16047            payload_buf[0..avail_len].copy_from_slice(__input);
16048            Bytes::new(&payload_buf)
16049        } else {
16050            Bytes::new(__input)
16051        };
16052        let mut __struct = Self::default();
16053        __struct.time_usec = buf.get_u64_le()?;
16054        let tmp = buf.get_u64_le()?;
16055        __struct.flags =
16056            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
16057                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16058                flag_type: "HilActuatorControlsFlags",
16059                value: tmp as u64,
16060            })?;
16061        for v in &mut __struct.controls {
16062            let val = buf.get_f32_le()?;
16063            *v = val;
16064        }
16065        let tmp = buf.get_u8()?;
16066        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16067            ::mavlink_core::error::ParserError::InvalidFlag {
16068                flag_type: "MavModeFlag",
16069                value: tmp as u64,
16070            },
16071        )?;
16072        Ok(__struct)
16073    }
16074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16075        let mut __tmp = BytesMut::new(bytes);
16076        #[allow(clippy::absurd_extreme_comparisons)]
16077        #[allow(unused_comparisons)]
16078        if __tmp.remaining() < Self::ENCODED_LEN {
16079            panic!(
16080                "buffer is too small (need {} bytes, but got {})",
16081                Self::ENCODED_LEN,
16082                __tmp.remaining(),
16083            )
16084        }
16085        __tmp.put_u64_le(self.time_usec);
16086        __tmp.put_u64_le(self.flags.bits() as u64);
16087        for val in &self.controls {
16088            __tmp.put_f32_le(*val);
16089        }
16090        __tmp.put_u8(self.mode.bits() as u8);
16091        if matches!(version, MavlinkVersion::V2) {
16092            let len = __tmp.len();
16093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16094        } else {
16095            __tmp.len()
16096        }
16097    }
16098}
16099#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16100#[doc = ""]
16101#[doc = "ID: 91"]
16102#[derive(Debug, Clone, PartialEq)]
16103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16105#[cfg_attr(feature = "ts", derive(TS))]
16106#[cfg_attr(feature = "ts", ts(export))]
16107pub struct HIL_CONTROLS_DATA {
16108    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16109    pub time_usec: u64,
16110    #[doc = "Control output -1 .. 1"]
16111    pub roll_ailerons: f32,
16112    #[doc = "Control output -1 .. 1"]
16113    pub pitch_elevator: f32,
16114    #[doc = "Control output -1 .. 1"]
16115    pub yaw_rudder: f32,
16116    #[doc = "Throttle 0 .. 1"]
16117    pub throttle: f32,
16118    #[doc = "Aux 1, -1 .. 1"]
16119    pub aux1: f32,
16120    #[doc = "Aux 2, -1 .. 1"]
16121    pub aux2: f32,
16122    #[doc = "Aux 3, -1 .. 1"]
16123    pub aux3: f32,
16124    #[doc = "Aux 4, -1 .. 1"]
16125    pub aux4: f32,
16126    #[doc = "System mode."]
16127    pub mode: MavMode,
16128    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16129    pub nav_mode: u8,
16130}
16131impl HIL_CONTROLS_DATA {
16132    pub const ENCODED_LEN: usize = 42usize;
16133    pub const DEFAULT: Self = Self {
16134        time_usec: 0_u64,
16135        roll_ailerons: 0.0_f32,
16136        pitch_elevator: 0.0_f32,
16137        yaw_rudder: 0.0_f32,
16138        throttle: 0.0_f32,
16139        aux1: 0.0_f32,
16140        aux2: 0.0_f32,
16141        aux3: 0.0_f32,
16142        aux4: 0.0_f32,
16143        mode: MavMode::DEFAULT,
16144        nav_mode: 0_u8,
16145    };
16146    #[cfg(feature = "arbitrary")]
16147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16148        use arbitrary::{Arbitrary, Unstructured};
16149        let mut buf = [0u8; 1024];
16150        rng.fill_bytes(&mut buf);
16151        let mut unstructured = Unstructured::new(&buf);
16152        Self::arbitrary(&mut unstructured).unwrap_or_default()
16153    }
16154}
16155impl Default for HIL_CONTROLS_DATA {
16156    fn default() -> Self {
16157        Self::DEFAULT.clone()
16158    }
16159}
16160impl MessageData for HIL_CONTROLS_DATA {
16161    type Message = MavMessage;
16162    const ID: u32 = 91u32;
16163    const NAME: &'static str = "HIL_CONTROLS";
16164    const EXTRA_CRC: u8 = 63u8;
16165    const ENCODED_LEN: usize = 42usize;
16166    fn deser(
16167        _version: MavlinkVersion,
16168        __input: &[u8],
16169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16170        let avail_len = __input.len();
16171        let mut payload_buf = [0; Self::ENCODED_LEN];
16172        let mut buf = if avail_len < Self::ENCODED_LEN {
16173            payload_buf[0..avail_len].copy_from_slice(__input);
16174            Bytes::new(&payload_buf)
16175        } else {
16176            Bytes::new(__input)
16177        };
16178        let mut __struct = Self::default();
16179        __struct.time_usec = buf.get_u64_le()?;
16180        __struct.roll_ailerons = buf.get_f32_le()?;
16181        __struct.pitch_elevator = buf.get_f32_le()?;
16182        __struct.yaw_rudder = buf.get_f32_le()?;
16183        __struct.throttle = buf.get_f32_le()?;
16184        __struct.aux1 = buf.get_f32_le()?;
16185        __struct.aux2 = buf.get_f32_le()?;
16186        __struct.aux3 = buf.get_f32_le()?;
16187        __struct.aux4 = buf.get_f32_le()?;
16188        let tmp = buf.get_u8()?;
16189        __struct.mode =
16190            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16191                enum_type: "MavMode",
16192                value: tmp as u64,
16193            })?;
16194        __struct.nav_mode = buf.get_u8()?;
16195        Ok(__struct)
16196    }
16197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16198        let mut __tmp = BytesMut::new(bytes);
16199        #[allow(clippy::absurd_extreme_comparisons)]
16200        #[allow(unused_comparisons)]
16201        if __tmp.remaining() < Self::ENCODED_LEN {
16202            panic!(
16203                "buffer is too small (need {} bytes, but got {})",
16204                Self::ENCODED_LEN,
16205                __tmp.remaining(),
16206            )
16207        }
16208        __tmp.put_u64_le(self.time_usec);
16209        __tmp.put_f32_le(self.roll_ailerons);
16210        __tmp.put_f32_le(self.pitch_elevator);
16211        __tmp.put_f32_le(self.yaw_rudder);
16212        __tmp.put_f32_le(self.throttle);
16213        __tmp.put_f32_le(self.aux1);
16214        __tmp.put_f32_le(self.aux2);
16215        __tmp.put_f32_le(self.aux3);
16216        __tmp.put_f32_le(self.aux4);
16217        __tmp.put_u8(self.mode as u8);
16218        __tmp.put_u8(self.nav_mode);
16219        if matches!(version, MavlinkVersion::V2) {
16220            let len = __tmp.len();
16221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16222        } else {
16223            __tmp.len()
16224        }
16225    }
16226}
16227#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16228#[doc = ""]
16229#[doc = "ID: 113"]
16230#[derive(Debug, Clone, PartialEq)]
16231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16233#[cfg_attr(feature = "ts", derive(TS))]
16234#[cfg_attr(feature = "ts", ts(export))]
16235pub struct HIL_GPS_DATA {
16236    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16237    pub time_usec: u64,
16238    #[doc = "Latitude (WGS84)"]
16239    pub lat: i32,
16240    #[doc = "Longitude (WGS84)"]
16241    pub lon: i32,
16242    #[doc = "Altitude (MSL). Positive for up."]
16243    pub alt: i32,
16244    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16245    pub eph: u16,
16246    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16247    pub epv: u16,
16248    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16249    pub vel: u16,
16250    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16251    pub vn: i16,
16252    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16253    pub ve: i16,
16254    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16255    pub vd: i16,
16256    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16257    pub cog: u16,
16258    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16259    pub fix_type: u8,
16260    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16261    pub satellites_visible: u8,
16262    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16263    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16264    pub id: u8,
16265    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16266    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16267    pub yaw: u16,
16268}
16269impl HIL_GPS_DATA {
16270    pub const ENCODED_LEN: usize = 39usize;
16271    pub const DEFAULT: Self = Self {
16272        time_usec: 0_u64,
16273        lat: 0_i32,
16274        lon: 0_i32,
16275        alt: 0_i32,
16276        eph: 0_u16,
16277        epv: 0_u16,
16278        vel: 0_u16,
16279        vn: 0_i16,
16280        ve: 0_i16,
16281        vd: 0_i16,
16282        cog: 0_u16,
16283        fix_type: 0_u8,
16284        satellites_visible: 0_u8,
16285        id: 0_u8,
16286        yaw: 0_u16,
16287    };
16288    #[cfg(feature = "arbitrary")]
16289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16290        use arbitrary::{Arbitrary, Unstructured};
16291        let mut buf = [0u8; 1024];
16292        rng.fill_bytes(&mut buf);
16293        let mut unstructured = Unstructured::new(&buf);
16294        Self::arbitrary(&mut unstructured).unwrap_or_default()
16295    }
16296}
16297impl Default for HIL_GPS_DATA {
16298    fn default() -> Self {
16299        Self::DEFAULT.clone()
16300    }
16301}
16302impl MessageData for HIL_GPS_DATA {
16303    type Message = MavMessage;
16304    const ID: u32 = 113u32;
16305    const NAME: &'static str = "HIL_GPS";
16306    const EXTRA_CRC: u8 = 124u8;
16307    const ENCODED_LEN: usize = 39usize;
16308    fn deser(
16309        _version: MavlinkVersion,
16310        __input: &[u8],
16311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16312        let avail_len = __input.len();
16313        let mut payload_buf = [0; Self::ENCODED_LEN];
16314        let mut buf = if avail_len < Self::ENCODED_LEN {
16315            payload_buf[0..avail_len].copy_from_slice(__input);
16316            Bytes::new(&payload_buf)
16317        } else {
16318            Bytes::new(__input)
16319        };
16320        let mut __struct = Self::default();
16321        __struct.time_usec = buf.get_u64_le()?;
16322        __struct.lat = buf.get_i32_le()?;
16323        __struct.lon = buf.get_i32_le()?;
16324        __struct.alt = buf.get_i32_le()?;
16325        __struct.eph = buf.get_u16_le()?;
16326        __struct.epv = buf.get_u16_le()?;
16327        __struct.vel = buf.get_u16_le()?;
16328        __struct.vn = buf.get_i16_le()?;
16329        __struct.ve = buf.get_i16_le()?;
16330        __struct.vd = buf.get_i16_le()?;
16331        __struct.cog = buf.get_u16_le()?;
16332        __struct.fix_type = buf.get_u8()?;
16333        __struct.satellites_visible = buf.get_u8()?;
16334        __struct.id = buf.get_u8()?;
16335        __struct.yaw = buf.get_u16_le()?;
16336        Ok(__struct)
16337    }
16338    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16339        let mut __tmp = BytesMut::new(bytes);
16340        #[allow(clippy::absurd_extreme_comparisons)]
16341        #[allow(unused_comparisons)]
16342        if __tmp.remaining() < Self::ENCODED_LEN {
16343            panic!(
16344                "buffer is too small (need {} bytes, but got {})",
16345                Self::ENCODED_LEN,
16346                __tmp.remaining(),
16347            )
16348        }
16349        __tmp.put_u64_le(self.time_usec);
16350        __tmp.put_i32_le(self.lat);
16351        __tmp.put_i32_le(self.lon);
16352        __tmp.put_i32_le(self.alt);
16353        __tmp.put_u16_le(self.eph);
16354        __tmp.put_u16_le(self.epv);
16355        __tmp.put_u16_le(self.vel);
16356        __tmp.put_i16_le(self.vn);
16357        __tmp.put_i16_le(self.ve);
16358        __tmp.put_i16_le(self.vd);
16359        __tmp.put_u16_le(self.cog);
16360        __tmp.put_u8(self.fix_type);
16361        __tmp.put_u8(self.satellites_visible);
16362        if matches!(version, MavlinkVersion::V2) {
16363            __tmp.put_u8(self.id);
16364            __tmp.put_u16_le(self.yaw);
16365            let len = __tmp.len();
16366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16367        } else {
16368            __tmp.len()
16369        }
16370    }
16371}
16372#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16373#[doc = ""]
16374#[doc = "ID: 114"]
16375#[derive(Debug, Clone, PartialEq)]
16376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16378#[cfg_attr(feature = "ts", derive(TS))]
16379#[cfg_attr(feature = "ts", ts(export))]
16380pub struct HIL_OPTICAL_FLOW_DATA {
16381    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16382    pub time_usec: u64,
16383    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16384    pub integration_time_us: u32,
16385    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16386    pub integrated_x: f32,
16387    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16388    pub integrated_y: f32,
16389    #[doc = "RH rotation around X axis"]
16390    pub integrated_xgyro: f32,
16391    #[doc = "RH rotation around Y axis"]
16392    pub integrated_ygyro: f32,
16393    #[doc = "RH rotation around Z axis"]
16394    pub integrated_zgyro: f32,
16395    #[doc = "Time since the distance was sampled."]
16396    pub time_delta_distance_us: u32,
16397    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16398    pub distance: f32,
16399    #[doc = "Temperature"]
16400    pub temperature: i16,
16401    #[doc = "Sensor ID"]
16402    pub sensor_id: u8,
16403    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16404    pub quality: u8,
16405}
16406impl HIL_OPTICAL_FLOW_DATA {
16407    pub const ENCODED_LEN: usize = 44usize;
16408    pub const DEFAULT: Self = Self {
16409        time_usec: 0_u64,
16410        integration_time_us: 0_u32,
16411        integrated_x: 0.0_f32,
16412        integrated_y: 0.0_f32,
16413        integrated_xgyro: 0.0_f32,
16414        integrated_ygyro: 0.0_f32,
16415        integrated_zgyro: 0.0_f32,
16416        time_delta_distance_us: 0_u32,
16417        distance: 0.0_f32,
16418        temperature: 0_i16,
16419        sensor_id: 0_u8,
16420        quality: 0_u8,
16421    };
16422    #[cfg(feature = "arbitrary")]
16423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16424        use arbitrary::{Arbitrary, Unstructured};
16425        let mut buf = [0u8; 1024];
16426        rng.fill_bytes(&mut buf);
16427        let mut unstructured = Unstructured::new(&buf);
16428        Self::arbitrary(&mut unstructured).unwrap_or_default()
16429    }
16430}
16431impl Default for HIL_OPTICAL_FLOW_DATA {
16432    fn default() -> Self {
16433        Self::DEFAULT.clone()
16434    }
16435}
16436impl MessageData for HIL_OPTICAL_FLOW_DATA {
16437    type Message = MavMessage;
16438    const ID: u32 = 114u32;
16439    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16440    const EXTRA_CRC: u8 = 237u8;
16441    const ENCODED_LEN: usize = 44usize;
16442    fn deser(
16443        _version: MavlinkVersion,
16444        __input: &[u8],
16445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16446        let avail_len = __input.len();
16447        let mut payload_buf = [0; Self::ENCODED_LEN];
16448        let mut buf = if avail_len < Self::ENCODED_LEN {
16449            payload_buf[0..avail_len].copy_from_slice(__input);
16450            Bytes::new(&payload_buf)
16451        } else {
16452            Bytes::new(__input)
16453        };
16454        let mut __struct = Self::default();
16455        __struct.time_usec = buf.get_u64_le()?;
16456        __struct.integration_time_us = buf.get_u32_le()?;
16457        __struct.integrated_x = buf.get_f32_le()?;
16458        __struct.integrated_y = buf.get_f32_le()?;
16459        __struct.integrated_xgyro = buf.get_f32_le()?;
16460        __struct.integrated_ygyro = buf.get_f32_le()?;
16461        __struct.integrated_zgyro = buf.get_f32_le()?;
16462        __struct.time_delta_distance_us = buf.get_u32_le()?;
16463        __struct.distance = buf.get_f32_le()?;
16464        __struct.temperature = buf.get_i16_le()?;
16465        __struct.sensor_id = buf.get_u8()?;
16466        __struct.quality = buf.get_u8()?;
16467        Ok(__struct)
16468    }
16469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16470        let mut __tmp = BytesMut::new(bytes);
16471        #[allow(clippy::absurd_extreme_comparisons)]
16472        #[allow(unused_comparisons)]
16473        if __tmp.remaining() < Self::ENCODED_LEN {
16474            panic!(
16475                "buffer is too small (need {} bytes, but got {})",
16476                Self::ENCODED_LEN,
16477                __tmp.remaining(),
16478            )
16479        }
16480        __tmp.put_u64_le(self.time_usec);
16481        __tmp.put_u32_le(self.integration_time_us);
16482        __tmp.put_f32_le(self.integrated_x);
16483        __tmp.put_f32_le(self.integrated_y);
16484        __tmp.put_f32_le(self.integrated_xgyro);
16485        __tmp.put_f32_le(self.integrated_ygyro);
16486        __tmp.put_f32_le(self.integrated_zgyro);
16487        __tmp.put_u32_le(self.time_delta_distance_us);
16488        __tmp.put_f32_le(self.distance);
16489        __tmp.put_i16_le(self.temperature);
16490        __tmp.put_u8(self.sensor_id);
16491        __tmp.put_u8(self.quality);
16492        if matches!(version, MavlinkVersion::V2) {
16493            let len = __tmp.len();
16494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16495        } else {
16496            __tmp.len()
16497        }
16498    }
16499}
16500#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16501#[doc = ""]
16502#[doc = "ID: 92"]
16503#[derive(Debug, Clone, PartialEq)]
16504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16506#[cfg_attr(feature = "ts", derive(TS))]
16507#[cfg_attr(feature = "ts", ts(export))]
16508pub struct HIL_RC_INPUTS_RAW_DATA {
16509    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16510    pub time_usec: u64,
16511    #[doc = "RC channel 1 value"]
16512    pub chan1_raw: u16,
16513    #[doc = "RC channel 2 value"]
16514    pub chan2_raw: u16,
16515    #[doc = "RC channel 3 value"]
16516    pub chan3_raw: u16,
16517    #[doc = "RC channel 4 value"]
16518    pub chan4_raw: u16,
16519    #[doc = "RC channel 5 value"]
16520    pub chan5_raw: u16,
16521    #[doc = "RC channel 6 value"]
16522    pub chan6_raw: u16,
16523    #[doc = "RC channel 7 value"]
16524    pub chan7_raw: u16,
16525    #[doc = "RC channel 8 value"]
16526    pub chan8_raw: u16,
16527    #[doc = "RC channel 9 value"]
16528    pub chan9_raw: u16,
16529    #[doc = "RC channel 10 value"]
16530    pub chan10_raw: u16,
16531    #[doc = "RC channel 11 value"]
16532    pub chan11_raw: u16,
16533    #[doc = "RC channel 12 value"]
16534    pub chan12_raw: u16,
16535    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16536    pub rssi: u8,
16537}
16538impl HIL_RC_INPUTS_RAW_DATA {
16539    pub const ENCODED_LEN: usize = 33usize;
16540    pub const DEFAULT: Self = Self {
16541        time_usec: 0_u64,
16542        chan1_raw: 0_u16,
16543        chan2_raw: 0_u16,
16544        chan3_raw: 0_u16,
16545        chan4_raw: 0_u16,
16546        chan5_raw: 0_u16,
16547        chan6_raw: 0_u16,
16548        chan7_raw: 0_u16,
16549        chan8_raw: 0_u16,
16550        chan9_raw: 0_u16,
16551        chan10_raw: 0_u16,
16552        chan11_raw: 0_u16,
16553        chan12_raw: 0_u16,
16554        rssi: 0_u8,
16555    };
16556    #[cfg(feature = "arbitrary")]
16557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16558        use arbitrary::{Arbitrary, Unstructured};
16559        let mut buf = [0u8; 1024];
16560        rng.fill_bytes(&mut buf);
16561        let mut unstructured = Unstructured::new(&buf);
16562        Self::arbitrary(&mut unstructured).unwrap_or_default()
16563    }
16564}
16565impl Default for HIL_RC_INPUTS_RAW_DATA {
16566    fn default() -> Self {
16567        Self::DEFAULT.clone()
16568    }
16569}
16570impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16571    type Message = MavMessage;
16572    const ID: u32 = 92u32;
16573    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16574    const EXTRA_CRC: u8 = 54u8;
16575    const ENCODED_LEN: usize = 33usize;
16576    fn deser(
16577        _version: MavlinkVersion,
16578        __input: &[u8],
16579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16580        let avail_len = __input.len();
16581        let mut payload_buf = [0; Self::ENCODED_LEN];
16582        let mut buf = if avail_len < Self::ENCODED_LEN {
16583            payload_buf[0..avail_len].copy_from_slice(__input);
16584            Bytes::new(&payload_buf)
16585        } else {
16586            Bytes::new(__input)
16587        };
16588        let mut __struct = Self::default();
16589        __struct.time_usec = buf.get_u64_le()?;
16590        __struct.chan1_raw = buf.get_u16_le()?;
16591        __struct.chan2_raw = buf.get_u16_le()?;
16592        __struct.chan3_raw = buf.get_u16_le()?;
16593        __struct.chan4_raw = buf.get_u16_le()?;
16594        __struct.chan5_raw = buf.get_u16_le()?;
16595        __struct.chan6_raw = buf.get_u16_le()?;
16596        __struct.chan7_raw = buf.get_u16_le()?;
16597        __struct.chan8_raw = buf.get_u16_le()?;
16598        __struct.chan9_raw = buf.get_u16_le()?;
16599        __struct.chan10_raw = buf.get_u16_le()?;
16600        __struct.chan11_raw = buf.get_u16_le()?;
16601        __struct.chan12_raw = buf.get_u16_le()?;
16602        __struct.rssi = buf.get_u8()?;
16603        Ok(__struct)
16604    }
16605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16606        let mut __tmp = BytesMut::new(bytes);
16607        #[allow(clippy::absurd_extreme_comparisons)]
16608        #[allow(unused_comparisons)]
16609        if __tmp.remaining() < Self::ENCODED_LEN {
16610            panic!(
16611                "buffer is too small (need {} bytes, but got {})",
16612                Self::ENCODED_LEN,
16613                __tmp.remaining(),
16614            )
16615        }
16616        __tmp.put_u64_le(self.time_usec);
16617        __tmp.put_u16_le(self.chan1_raw);
16618        __tmp.put_u16_le(self.chan2_raw);
16619        __tmp.put_u16_le(self.chan3_raw);
16620        __tmp.put_u16_le(self.chan4_raw);
16621        __tmp.put_u16_le(self.chan5_raw);
16622        __tmp.put_u16_le(self.chan6_raw);
16623        __tmp.put_u16_le(self.chan7_raw);
16624        __tmp.put_u16_le(self.chan8_raw);
16625        __tmp.put_u16_le(self.chan9_raw);
16626        __tmp.put_u16_le(self.chan10_raw);
16627        __tmp.put_u16_le(self.chan11_raw);
16628        __tmp.put_u16_le(self.chan12_raw);
16629        __tmp.put_u8(self.rssi);
16630        if matches!(version, MavlinkVersion::V2) {
16631            let len = __tmp.len();
16632            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16633        } else {
16634            __tmp.len()
16635        }
16636    }
16637}
16638#[doc = "The IMU readings in SI units in NED body frame."]
16639#[doc = ""]
16640#[doc = "ID: 107"]
16641#[derive(Debug, Clone, PartialEq)]
16642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16644#[cfg_attr(feature = "ts", derive(TS))]
16645#[cfg_attr(feature = "ts", ts(export))]
16646pub struct HIL_SENSOR_DATA {
16647    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16648    pub time_usec: u64,
16649    #[doc = "X acceleration"]
16650    pub xacc: f32,
16651    #[doc = "Y acceleration"]
16652    pub yacc: f32,
16653    #[doc = "Z acceleration"]
16654    pub zacc: f32,
16655    #[doc = "Angular speed around X axis in body frame"]
16656    pub xgyro: f32,
16657    #[doc = "Angular speed around Y axis in body frame"]
16658    pub ygyro: f32,
16659    #[doc = "Angular speed around Z axis in body frame"]
16660    pub zgyro: f32,
16661    #[doc = "X Magnetic field"]
16662    pub xmag: f32,
16663    #[doc = "Y Magnetic field"]
16664    pub ymag: f32,
16665    #[doc = "Z Magnetic field"]
16666    pub zmag: f32,
16667    #[doc = "Absolute pressure"]
16668    pub abs_pressure: f32,
16669    #[doc = "Differential pressure (airspeed)"]
16670    pub diff_pressure: f32,
16671    #[doc = "Altitude calculated from pressure"]
16672    pub pressure_alt: f32,
16673    #[doc = "Temperature"]
16674    pub temperature: f32,
16675    #[doc = "Bitmap for fields that have updated since last message"]
16676    pub fields_updated: HilSensorUpdatedFlags,
16677    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16678    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16679    pub id: u8,
16680}
16681impl HIL_SENSOR_DATA {
16682    pub const ENCODED_LEN: usize = 65usize;
16683    pub const DEFAULT: Self = Self {
16684        time_usec: 0_u64,
16685        xacc: 0.0_f32,
16686        yacc: 0.0_f32,
16687        zacc: 0.0_f32,
16688        xgyro: 0.0_f32,
16689        ygyro: 0.0_f32,
16690        zgyro: 0.0_f32,
16691        xmag: 0.0_f32,
16692        ymag: 0.0_f32,
16693        zmag: 0.0_f32,
16694        abs_pressure: 0.0_f32,
16695        diff_pressure: 0.0_f32,
16696        pressure_alt: 0.0_f32,
16697        temperature: 0.0_f32,
16698        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16699        id: 0_u8,
16700    };
16701    #[cfg(feature = "arbitrary")]
16702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16703        use arbitrary::{Arbitrary, Unstructured};
16704        let mut buf = [0u8; 1024];
16705        rng.fill_bytes(&mut buf);
16706        let mut unstructured = Unstructured::new(&buf);
16707        Self::arbitrary(&mut unstructured).unwrap_or_default()
16708    }
16709}
16710impl Default for HIL_SENSOR_DATA {
16711    fn default() -> Self {
16712        Self::DEFAULT.clone()
16713    }
16714}
16715impl MessageData for HIL_SENSOR_DATA {
16716    type Message = MavMessage;
16717    const ID: u32 = 107u32;
16718    const NAME: &'static str = "HIL_SENSOR";
16719    const EXTRA_CRC: u8 = 108u8;
16720    const ENCODED_LEN: usize = 65usize;
16721    fn deser(
16722        _version: MavlinkVersion,
16723        __input: &[u8],
16724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16725        let avail_len = __input.len();
16726        let mut payload_buf = [0; Self::ENCODED_LEN];
16727        let mut buf = if avail_len < Self::ENCODED_LEN {
16728            payload_buf[0..avail_len].copy_from_slice(__input);
16729            Bytes::new(&payload_buf)
16730        } else {
16731            Bytes::new(__input)
16732        };
16733        let mut __struct = Self::default();
16734        __struct.time_usec = buf.get_u64_le()?;
16735        __struct.xacc = buf.get_f32_le()?;
16736        __struct.yacc = buf.get_f32_le()?;
16737        __struct.zacc = buf.get_f32_le()?;
16738        __struct.xgyro = buf.get_f32_le()?;
16739        __struct.ygyro = buf.get_f32_le()?;
16740        __struct.zgyro = buf.get_f32_le()?;
16741        __struct.xmag = buf.get_f32_le()?;
16742        __struct.ymag = buf.get_f32_le()?;
16743        __struct.zmag = buf.get_f32_le()?;
16744        __struct.abs_pressure = buf.get_f32_le()?;
16745        __struct.diff_pressure = buf.get_f32_le()?;
16746        __struct.pressure_alt = buf.get_f32_le()?;
16747        __struct.temperature = buf.get_f32_le()?;
16748        let tmp = buf.get_u32_le()?;
16749        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16750            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16751        )
16752        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16753            flag_type: "HilSensorUpdatedFlags",
16754            value: tmp as u64,
16755        })?;
16756        __struct.id = buf.get_u8()?;
16757        Ok(__struct)
16758    }
16759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16760        let mut __tmp = BytesMut::new(bytes);
16761        #[allow(clippy::absurd_extreme_comparisons)]
16762        #[allow(unused_comparisons)]
16763        if __tmp.remaining() < Self::ENCODED_LEN {
16764            panic!(
16765                "buffer is too small (need {} bytes, but got {})",
16766                Self::ENCODED_LEN,
16767                __tmp.remaining(),
16768            )
16769        }
16770        __tmp.put_u64_le(self.time_usec);
16771        __tmp.put_f32_le(self.xacc);
16772        __tmp.put_f32_le(self.yacc);
16773        __tmp.put_f32_le(self.zacc);
16774        __tmp.put_f32_le(self.xgyro);
16775        __tmp.put_f32_le(self.ygyro);
16776        __tmp.put_f32_le(self.zgyro);
16777        __tmp.put_f32_le(self.xmag);
16778        __tmp.put_f32_le(self.ymag);
16779        __tmp.put_f32_le(self.zmag);
16780        __tmp.put_f32_le(self.abs_pressure);
16781        __tmp.put_f32_le(self.diff_pressure);
16782        __tmp.put_f32_le(self.pressure_alt);
16783        __tmp.put_f32_le(self.temperature);
16784        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16785        if matches!(version, MavlinkVersion::V2) {
16786            __tmp.put_u8(self.id);
16787            let len = __tmp.len();
16788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16789        } else {
16790            __tmp.len()
16791        }
16792    }
16793}
16794#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16795#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16796#[doc = ""]
16797#[doc = "ID: 90"]
16798#[derive(Debug, Clone, PartialEq)]
16799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16801#[cfg_attr(feature = "ts", derive(TS))]
16802#[cfg_attr(feature = "ts", ts(export))]
16803pub struct HIL_STATE_DATA {
16804    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16805    pub time_usec: u64,
16806    #[doc = "Roll angle"]
16807    pub roll: f32,
16808    #[doc = "Pitch angle"]
16809    pub pitch: f32,
16810    #[doc = "Yaw angle"]
16811    pub yaw: f32,
16812    #[doc = "Body frame roll / phi angular speed"]
16813    pub rollspeed: f32,
16814    #[doc = "Body frame pitch / theta angular speed"]
16815    pub pitchspeed: f32,
16816    #[doc = "Body frame yaw / psi angular speed"]
16817    pub yawspeed: f32,
16818    #[doc = "Latitude"]
16819    pub lat: i32,
16820    #[doc = "Longitude"]
16821    pub lon: i32,
16822    #[doc = "Altitude"]
16823    pub alt: i32,
16824    #[doc = "Ground X Speed (Latitude)"]
16825    pub vx: i16,
16826    #[doc = "Ground Y Speed (Longitude)"]
16827    pub vy: i16,
16828    #[doc = "Ground Z Speed (Altitude)"]
16829    pub vz: i16,
16830    #[doc = "X acceleration"]
16831    pub xacc: i16,
16832    #[doc = "Y acceleration"]
16833    pub yacc: i16,
16834    #[doc = "Z acceleration"]
16835    pub zacc: i16,
16836}
16837impl HIL_STATE_DATA {
16838    pub const ENCODED_LEN: usize = 56usize;
16839    pub const DEFAULT: Self = Self {
16840        time_usec: 0_u64,
16841        roll: 0.0_f32,
16842        pitch: 0.0_f32,
16843        yaw: 0.0_f32,
16844        rollspeed: 0.0_f32,
16845        pitchspeed: 0.0_f32,
16846        yawspeed: 0.0_f32,
16847        lat: 0_i32,
16848        lon: 0_i32,
16849        alt: 0_i32,
16850        vx: 0_i16,
16851        vy: 0_i16,
16852        vz: 0_i16,
16853        xacc: 0_i16,
16854        yacc: 0_i16,
16855        zacc: 0_i16,
16856    };
16857    #[cfg(feature = "arbitrary")]
16858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16859        use arbitrary::{Arbitrary, Unstructured};
16860        let mut buf = [0u8; 1024];
16861        rng.fill_bytes(&mut buf);
16862        let mut unstructured = Unstructured::new(&buf);
16863        Self::arbitrary(&mut unstructured).unwrap_or_default()
16864    }
16865}
16866impl Default for HIL_STATE_DATA {
16867    fn default() -> Self {
16868        Self::DEFAULT.clone()
16869    }
16870}
16871impl MessageData for HIL_STATE_DATA {
16872    type Message = MavMessage;
16873    const ID: u32 = 90u32;
16874    const NAME: &'static str = "HIL_STATE";
16875    const EXTRA_CRC: u8 = 183u8;
16876    const ENCODED_LEN: usize = 56usize;
16877    fn deser(
16878        _version: MavlinkVersion,
16879        __input: &[u8],
16880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16881        let avail_len = __input.len();
16882        let mut payload_buf = [0; Self::ENCODED_LEN];
16883        let mut buf = if avail_len < Self::ENCODED_LEN {
16884            payload_buf[0..avail_len].copy_from_slice(__input);
16885            Bytes::new(&payload_buf)
16886        } else {
16887            Bytes::new(__input)
16888        };
16889        let mut __struct = Self::default();
16890        __struct.time_usec = buf.get_u64_le()?;
16891        __struct.roll = buf.get_f32_le()?;
16892        __struct.pitch = buf.get_f32_le()?;
16893        __struct.yaw = buf.get_f32_le()?;
16894        __struct.rollspeed = buf.get_f32_le()?;
16895        __struct.pitchspeed = buf.get_f32_le()?;
16896        __struct.yawspeed = buf.get_f32_le()?;
16897        __struct.lat = buf.get_i32_le()?;
16898        __struct.lon = buf.get_i32_le()?;
16899        __struct.alt = buf.get_i32_le()?;
16900        __struct.vx = buf.get_i16_le()?;
16901        __struct.vy = buf.get_i16_le()?;
16902        __struct.vz = buf.get_i16_le()?;
16903        __struct.xacc = buf.get_i16_le()?;
16904        __struct.yacc = buf.get_i16_le()?;
16905        __struct.zacc = buf.get_i16_le()?;
16906        Ok(__struct)
16907    }
16908    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16909        let mut __tmp = BytesMut::new(bytes);
16910        #[allow(clippy::absurd_extreme_comparisons)]
16911        #[allow(unused_comparisons)]
16912        if __tmp.remaining() < Self::ENCODED_LEN {
16913            panic!(
16914                "buffer is too small (need {} bytes, but got {})",
16915                Self::ENCODED_LEN,
16916                __tmp.remaining(),
16917            )
16918        }
16919        __tmp.put_u64_le(self.time_usec);
16920        __tmp.put_f32_le(self.roll);
16921        __tmp.put_f32_le(self.pitch);
16922        __tmp.put_f32_le(self.yaw);
16923        __tmp.put_f32_le(self.rollspeed);
16924        __tmp.put_f32_le(self.pitchspeed);
16925        __tmp.put_f32_le(self.yawspeed);
16926        __tmp.put_i32_le(self.lat);
16927        __tmp.put_i32_le(self.lon);
16928        __tmp.put_i32_le(self.alt);
16929        __tmp.put_i16_le(self.vx);
16930        __tmp.put_i16_le(self.vy);
16931        __tmp.put_i16_le(self.vz);
16932        __tmp.put_i16_le(self.xacc);
16933        __tmp.put_i16_le(self.yacc);
16934        __tmp.put_i16_le(self.zacc);
16935        if matches!(version, MavlinkVersion::V2) {
16936            let len = __tmp.len();
16937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16938        } else {
16939            __tmp.len()
16940        }
16941    }
16942}
16943#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16944#[doc = ""]
16945#[doc = "ID: 115"]
16946#[derive(Debug, Clone, PartialEq)]
16947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16949#[cfg_attr(feature = "ts", derive(TS))]
16950#[cfg_attr(feature = "ts", ts(export))]
16951pub struct HIL_STATE_QUATERNION_DATA {
16952    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16953    pub time_usec: u64,
16954    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16957    pub attitude_quaternion: [f32; 4],
16958    #[doc = "Body frame roll / phi angular speed"]
16959    pub rollspeed: f32,
16960    #[doc = "Body frame pitch / theta angular speed"]
16961    pub pitchspeed: f32,
16962    #[doc = "Body frame yaw / psi angular speed"]
16963    pub yawspeed: f32,
16964    #[doc = "Latitude"]
16965    pub lat: i32,
16966    #[doc = "Longitude"]
16967    pub lon: i32,
16968    #[doc = "Altitude"]
16969    pub alt: i32,
16970    #[doc = "Ground X Speed (Latitude)"]
16971    pub vx: i16,
16972    #[doc = "Ground Y Speed (Longitude)"]
16973    pub vy: i16,
16974    #[doc = "Ground Z Speed (Altitude)"]
16975    pub vz: i16,
16976    #[doc = "Indicated airspeed"]
16977    pub ind_airspeed: u16,
16978    #[doc = "True airspeed"]
16979    pub true_airspeed: u16,
16980    #[doc = "X acceleration"]
16981    pub xacc: i16,
16982    #[doc = "Y acceleration"]
16983    pub yacc: i16,
16984    #[doc = "Z acceleration"]
16985    pub zacc: i16,
16986}
16987impl HIL_STATE_QUATERNION_DATA {
16988    pub const ENCODED_LEN: usize = 64usize;
16989    pub const DEFAULT: Self = Self {
16990        time_usec: 0_u64,
16991        attitude_quaternion: [0.0_f32; 4usize],
16992        rollspeed: 0.0_f32,
16993        pitchspeed: 0.0_f32,
16994        yawspeed: 0.0_f32,
16995        lat: 0_i32,
16996        lon: 0_i32,
16997        alt: 0_i32,
16998        vx: 0_i16,
16999        vy: 0_i16,
17000        vz: 0_i16,
17001        ind_airspeed: 0_u16,
17002        true_airspeed: 0_u16,
17003        xacc: 0_i16,
17004        yacc: 0_i16,
17005        zacc: 0_i16,
17006    };
17007    #[cfg(feature = "arbitrary")]
17008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17009        use arbitrary::{Arbitrary, Unstructured};
17010        let mut buf = [0u8; 1024];
17011        rng.fill_bytes(&mut buf);
17012        let mut unstructured = Unstructured::new(&buf);
17013        Self::arbitrary(&mut unstructured).unwrap_or_default()
17014    }
17015}
17016impl Default for HIL_STATE_QUATERNION_DATA {
17017    fn default() -> Self {
17018        Self::DEFAULT.clone()
17019    }
17020}
17021impl MessageData for HIL_STATE_QUATERNION_DATA {
17022    type Message = MavMessage;
17023    const ID: u32 = 115u32;
17024    const NAME: &'static str = "HIL_STATE_QUATERNION";
17025    const EXTRA_CRC: u8 = 4u8;
17026    const ENCODED_LEN: usize = 64usize;
17027    fn deser(
17028        _version: MavlinkVersion,
17029        __input: &[u8],
17030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17031        let avail_len = __input.len();
17032        let mut payload_buf = [0; Self::ENCODED_LEN];
17033        let mut buf = if avail_len < Self::ENCODED_LEN {
17034            payload_buf[0..avail_len].copy_from_slice(__input);
17035            Bytes::new(&payload_buf)
17036        } else {
17037            Bytes::new(__input)
17038        };
17039        let mut __struct = Self::default();
17040        __struct.time_usec = buf.get_u64_le()?;
17041        for v in &mut __struct.attitude_quaternion {
17042            let val = buf.get_f32_le()?;
17043            *v = val;
17044        }
17045        __struct.rollspeed = buf.get_f32_le()?;
17046        __struct.pitchspeed = buf.get_f32_le()?;
17047        __struct.yawspeed = buf.get_f32_le()?;
17048        __struct.lat = buf.get_i32_le()?;
17049        __struct.lon = buf.get_i32_le()?;
17050        __struct.alt = buf.get_i32_le()?;
17051        __struct.vx = buf.get_i16_le()?;
17052        __struct.vy = buf.get_i16_le()?;
17053        __struct.vz = buf.get_i16_le()?;
17054        __struct.ind_airspeed = buf.get_u16_le()?;
17055        __struct.true_airspeed = buf.get_u16_le()?;
17056        __struct.xacc = buf.get_i16_le()?;
17057        __struct.yacc = buf.get_i16_le()?;
17058        __struct.zacc = buf.get_i16_le()?;
17059        Ok(__struct)
17060    }
17061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17062        let mut __tmp = BytesMut::new(bytes);
17063        #[allow(clippy::absurd_extreme_comparisons)]
17064        #[allow(unused_comparisons)]
17065        if __tmp.remaining() < Self::ENCODED_LEN {
17066            panic!(
17067                "buffer is too small (need {} bytes, but got {})",
17068                Self::ENCODED_LEN,
17069                __tmp.remaining(),
17070            )
17071        }
17072        __tmp.put_u64_le(self.time_usec);
17073        for val in &self.attitude_quaternion {
17074            __tmp.put_f32_le(*val);
17075        }
17076        __tmp.put_f32_le(self.rollspeed);
17077        __tmp.put_f32_le(self.pitchspeed);
17078        __tmp.put_f32_le(self.yawspeed);
17079        __tmp.put_i32_le(self.lat);
17080        __tmp.put_i32_le(self.lon);
17081        __tmp.put_i32_le(self.alt);
17082        __tmp.put_i16_le(self.vx);
17083        __tmp.put_i16_le(self.vy);
17084        __tmp.put_i16_le(self.vz);
17085        __tmp.put_u16_le(self.ind_airspeed);
17086        __tmp.put_u16_le(self.true_airspeed);
17087        __tmp.put_i16_le(self.xacc);
17088        __tmp.put_i16_le(self.yacc);
17089        __tmp.put_i16_le(self.zacc);
17090        if matches!(version, MavlinkVersion::V2) {
17091            let len = __tmp.len();
17092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17093        } else {
17094            __tmp.len()
17095        }
17096    }
17097}
17098#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17099#[doc = ""]
17100#[doc = "ID: 242"]
17101#[derive(Debug, Clone, PartialEq)]
17102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17104#[cfg_attr(feature = "ts", derive(TS))]
17105#[cfg_attr(feature = "ts", ts(export))]
17106pub struct HOME_POSITION_DATA {
17107    #[doc = "Latitude (WGS84)"]
17108    pub latitude: i32,
17109    #[doc = "Longitude (WGS84)"]
17110    pub longitude: i32,
17111    #[doc = "Altitude (MSL). Positive for up."]
17112    pub altitude: i32,
17113    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17114    pub x: f32,
17115    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17116    pub y: f32,
17117    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17118    pub z: f32,
17119    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17121    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17122    pub q: [f32; 4],
17123    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17124    pub approach_x: f32,
17125    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17126    pub approach_y: f32,
17127    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17128    pub approach_z: f32,
17129    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17131    pub time_usec: u64,
17132}
17133impl HOME_POSITION_DATA {
17134    pub const ENCODED_LEN: usize = 60usize;
17135    pub const DEFAULT: Self = Self {
17136        latitude: 0_i32,
17137        longitude: 0_i32,
17138        altitude: 0_i32,
17139        x: 0.0_f32,
17140        y: 0.0_f32,
17141        z: 0.0_f32,
17142        q: [0.0_f32; 4usize],
17143        approach_x: 0.0_f32,
17144        approach_y: 0.0_f32,
17145        approach_z: 0.0_f32,
17146        time_usec: 0_u64,
17147    };
17148    #[cfg(feature = "arbitrary")]
17149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17150        use arbitrary::{Arbitrary, Unstructured};
17151        let mut buf = [0u8; 1024];
17152        rng.fill_bytes(&mut buf);
17153        let mut unstructured = Unstructured::new(&buf);
17154        Self::arbitrary(&mut unstructured).unwrap_or_default()
17155    }
17156}
17157impl Default for HOME_POSITION_DATA {
17158    fn default() -> Self {
17159        Self::DEFAULT.clone()
17160    }
17161}
17162impl MessageData for HOME_POSITION_DATA {
17163    type Message = MavMessage;
17164    const ID: u32 = 242u32;
17165    const NAME: &'static str = "HOME_POSITION";
17166    const EXTRA_CRC: u8 = 104u8;
17167    const ENCODED_LEN: usize = 60usize;
17168    fn deser(
17169        _version: MavlinkVersion,
17170        __input: &[u8],
17171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17172        let avail_len = __input.len();
17173        let mut payload_buf = [0; Self::ENCODED_LEN];
17174        let mut buf = if avail_len < Self::ENCODED_LEN {
17175            payload_buf[0..avail_len].copy_from_slice(__input);
17176            Bytes::new(&payload_buf)
17177        } else {
17178            Bytes::new(__input)
17179        };
17180        let mut __struct = Self::default();
17181        __struct.latitude = buf.get_i32_le()?;
17182        __struct.longitude = buf.get_i32_le()?;
17183        __struct.altitude = buf.get_i32_le()?;
17184        __struct.x = buf.get_f32_le()?;
17185        __struct.y = buf.get_f32_le()?;
17186        __struct.z = buf.get_f32_le()?;
17187        for v in &mut __struct.q {
17188            let val = buf.get_f32_le()?;
17189            *v = val;
17190        }
17191        __struct.approach_x = buf.get_f32_le()?;
17192        __struct.approach_y = buf.get_f32_le()?;
17193        __struct.approach_z = buf.get_f32_le()?;
17194        __struct.time_usec = buf.get_u64_le()?;
17195        Ok(__struct)
17196    }
17197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17198        let mut __tmp = BytesMut::new(bytes);
17199        #[allow(clippy::absurd_extreme_comparisons)]
17200        #[allow(unused_comparisons)]
17201        if __tmp.remaining() < Self::ENCODED_LEN {
17202            panic!(
17203                "buffer is too small (need {} bytes, but got {})",
17204                Self::ENCODED_LEN,
17205                __tmp.remaining(),
17206            )
17207        }
17208        __tmp.put_i32_le(self.latitude);
17209        __tmp.put_i32_le(self.longitude);
17210        __tmp.put_i32_le(self.altitude);
17211        __tmp.put_f32_le(self.x);
17212        __tmp.put_f32_le(self.y);
17213        __tmp.put_f32_le(self.z);
17214        for val in &self.q {
17215            __tmp.put_f32_le(*val);
17216        }
17217        __tmp.put_f32_le(self.approach_x);
17218        __tmp.put_f32_le(self.approach_y);
17219        __tmp.put_f32_le(self.approach_z);
17220        if matches!(version, MavlinkVersion::V2) {
17221            __tmp.put_u64_le(self.time_usec);
17222            let len = __tmp.len();
17223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17224        } else {
17225            __tmp.len()
17226        }
17227    }
17228}
17229#[doc = "Temperature and humidity from hygrometer."]
17230#[doc = ""]
17231#[doc = "ID: 12920"]
17232#[derive(Debug, Clone, PartialEq)]
17233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17235#[cfg_attr(feature = "ts", derive(TS))]
17236#[cfg_attr(feature = "ts", ts(export))]
17237pub struct HYGROMETER_SENSOR_DATA {
17238    #[doc = "Temperature"]
17239    pub temperature: i16,
17240    #[doc = "Humidity"]
17241    pub humidity: u16,
17242    #[doc = "Hygrometer ID"]
17243    pub id: u8,
17244}
17245impl HYGROMETER_SENSOR_DATA {
17246    pub const ENCODED_LEN: usize = 5usize;
17247    pub const DEFAULT: Self = Self {
17248        temperature: 0_i16,
17249        humidity: 0_u16,
17250        id: 0_u8,
17251    };
17252    #[cfg(feature = "arbitrary")]
17253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17254        use arbitrary::{Arbitrary, Unstructured};
17255        let mut buf = [0u8; 1024];
17256        rng.fill_bytes(&mut buf);
17257        let mut unstructured = Unstructured::new(&buf);
17258        Self::arbitrary(&mut unstructured).unwrap_or_default()
17259    }
17260}
17261impl Default for HYGROMETER_SENSOR_DATA {
17262    fn default() -> Self {
17263        Self::DEFAULT.clone()
17264    }
17265}
17266impl MessageData for HYGROMETER_SENSOR_DATA {
17267    type Message = MavMessage;
17268    const ID: u32 = 12920u32;
17269    const NAME: &'static str = "HYGROMETER_SENSOR";
17270    const EXTRA_CRC: u8 = 20u8;
17271    const ENCODED_LEN: usize = 5usize;
17272    fn deser(
17273        _version: MavlinkVersion,
17274        __input: &[u8],
17275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17276        let avail_len = __input.len();
17277        let mut payload_buf = [0; Self::ENCODED_LEN];
17278        let mut buf = if avail_len < Self::ENCODED_LEN {
17279            payload_buf[0..avail_len].copy_from_slice(__input);
17280            Bytes::new(&payload_buf)
17281        } else {
17282            Bytes::new(__input)
17283        };
17284        let mut __struct = Self::default();
17285        __struct.temperature = buf.get_i16_le()?;
17286        __struct.humidity = buf.get_u16_le()?;
17287        __struct.id = buf.get_u8()?;
17288        Ok(__struct)
17289    }
17290    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17291        let mut __tmp = BytesMut::new(bytes);
17292        #[allow(clippy::absurd_extreme_comparisons)]
17293        #[allow(unused_comparisons)]
17294        if __tmp.remaining() < Self::ENCODED_LEN {
17295            panic!(
17296                "buffer is too small (need {} bytes, but got {})",
17297                Self::ENCODED_LEN,
17298                __tmp.remaining(),
17299            )
17300        }
17301        __tmp.put_i16_le(self.temperature);
17302        __tmp.put_u16_le(self.humidity);
17303        __tmp.put_u8(self.id);
17304        if matches!(version, MavlinkVersion::V2) {
17305            let len = __tmp.len();
17306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17307        } else {
17308            __tmp.len()
17309        }
17310    }
17311}
17312#[doc = "Illuminator status."]
17313#[doc = ""]
17314#[doc = "ID: 440"]
17315#[derive(Debug, Clone, PartialEq)]
17316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17318#[cfg_attr(feature = "ts", derive(TS))]
17319#[cfg_attr(feature = "ts", ts(export))]
17320pub struct ILLUMINATOR_STATUS_DATA {
17321    #[doc = "Time since the start-up of the illuminator in ms"]
17322    pub uptime_ms: u32,
17323    #[doc = "Errors"]
17324    pub error_status: IlluminatorErrorFlags,
17325    #[doc = "Illuminator brightness"]
17326    pub brightness: f32,
17327    #[doc = "Illuminator strobing period in seconds"]
17328    pub strobe_period: f32,
17329    #[doc = "Illuminator strobing duty cycle"]
17330    pub strobe_duty_cycle: f32,
17331    #[doc = "Temperature in Celsius"]
17332    pub temp_c: f32,
17333    #[doc = "Minimum strobing period in seconds"]
17334    pub min_strobe_period: f32,
17335    #[doc = "Maximum strobing period in seconds"]
17336    pub max_strobe_period: f32,
17337    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17338    pub enable: u8,
17339    #[doc = "Supported illuminator modes"]
17340    pub mode_bitmask: IlluminatorMode,
17341    #[doc = "Illuminator mode"]
17342    pub mode: IlluminatorMode,
17343}
17344impl ILLUMINATOR_STATUS_DATA {
17345    pub const ENCODED_LEN: usize = 35usize;
17346    pub const DEFAULT: Self = Self {
17347        uptime_ms: 0_u32,
17348        error_status: IlluminatorErrorFlags::DEFAULT,
17349        brightness: 0.0_f32,
17350        strobe_period: 0.0_f32,
17351        strobe_duty_cycle: 0.0_f32,
17352        temp_c: 0.0_f32,
17353        min_strobe_period: 0.0_f32,
17354        max_strobe_period: 0.0_f32,
17355        enable: 0_u8,
17356        mode_bitmask: IlluminatorMode::DEFAULT,
17357        mode: IlluminatorMode::DEFAULT,
17358    };
17359    #[cfg(feature = "arbitrary")]
17360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17361        use arbitrary::{Arbitrary, Unstructured};
17362        let mut buf = [0u8; 1024];
17363        rng.fill_bytes(&mut buf);
17364        let mut unstructured = Unstructured::new(&buf);
17365        Self::arbitrary(&mut unstructured).unwrap_or_default()
17366    }
17367}
17368impl Default for ILLUMINATOR_STATUS_DATA {
17369    fn default() -> Self {
17370        Self::DEFAULT.clone()
17371    }
17372}
17373impl MessageData for ILLUMINATOR_STATUS_DATA {
17374    type Message = MavMessage;
17375    const ID: u32 = 440u32;
17376    const NAME: &'static str = "ILLUMINATOR_STATUS";
17377    const EXTRA_CRC: u8 = 66u8;
17378    const ENCODED_LEN: usize = 35usize;
17379    fn deser(
17380        _version: MavlinkVersion,
17381        __input: &[u8],
17382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17383        let avail_len = __input.len();
17384        let mut payload_buf = [0; Self::ENCODED_LEN];
17385        let mut buf = if avail_len < Self::ENCODED_LEN {
17386            payload_buf[0..avail_len].copy_from_slice(__input);
17387            Bytes::new(&payload_buf)
17388        } else {
17389            Bytes::new(__input)
17390        };
17391        let mut __struct = Self::default();
17392        __struct.uptime_ms = buf.get_u32_le()?;
17393        let tmp = buf.get_u32_le()?;
17394        __struct.error_status = IlluminatorErrorFlags::from_bits(
17395            tmp as <IlluminatorErrorFlags as Flags>::Bits,
17396        )
17397        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17398            flag_type: "IlluminatorErrorFlags",
17399            value: tmp as u64,
17400        })?;
17401        __struct.brightness = buf.get_f32_le()?;
17402        __struct.strobe_period = buf.get_f32_le()?;
17403        __struct.strobe_duty_cycle = buf.get_f32_le()?;
17404        __struct.temp_c = buf.get_f32_le()?;
17405        __struct.min_strobe_period = buf.get_f32_le()?;
17406        __struct.max_strobe_period = buf.get_f32_le()?;
17407        __struct.enable = buf.get_u8()?;
17408        let tmp = buf.get_u8()?;
17409        __struct.mode_bitmask =
17410            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17411                enum_type: "IlluminatorMode",
17412                value: tmp as u64,
17413            })?;
17414        let tmp = buf.get_u8()?;
17415        __struct.mode =
17416            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17417                enum_type: "IlluminatorMode",
17418                value: tmp as u64,
17419            })?;
17420        Ok(__struct)
17421    }
17422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17423        let mut __tmp = BytesMut::new(bytes);
17424        #[allow(clippy::absurd_extreme_comparisons)]
17425        #[allow(unused_comparisons)]
17426        if __tmp.remaining() < Self::ENCODED_LEN {
17427            panic!(
17428                "buffer is too small (need {} bytes, but got {})",
17429                Self::ENCODED_LEN,
17430                __tmp.remaining(),
17431            )
17432        }
17433        __tmp.put_u32_le(self.uptime_ms);
17434        __tmp.put_u32_le(self.error_status.bits() as u32);
17435        __tmp.put_f32_le(self.brightness);
17436        __tmp.put_f32_le(self.strobe_period);
17437        __tmp.put_f32_le(self.strobe_duty_cycle);
17438        __tmp.put_f32_le(self.temp_c);
17439        __tmp.put_f32_le(self.min_strobe_period);
17440        __tmp.put_f32_le(self.max_strobe_period);
17441        __tmp.put_u8(self.enable);
17442        __tmp.put_u8(self.mode_bitmask as u8);
17443        __tmp.put_u8(self.mode as u8);
17444        if matches!(version, MavlinkVersion::V2) {
17445            let len = __tmp.len();
17446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17447        } else {
17448            __tmp.len()
17449        }
17450    }
17451}
17452#[doc = "Status of the Iridium SBD link."]
17453#[doc = ""]
17454#[doc = "ID: 335"]
17455#[derive(Debug, Clone, PartialEq)]
17456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17458#[cfg_attr(feature = "ts", derive(TS))]
17459#[cfg_attr(feature = "ts", ts(export))]
17460pub struct ISBD_LINK_STATUS_DATA {
17461    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17462    pub timestamp: u64,
17463    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17464    pub last_heartbeat: u64,
17465    #[doc = "Number of failed SBD sessions."]
17466    pub failed_sessions: u16,
17467    #[doc = "Number of successful SBD sessions."]
17468    pub successful_sessions: u16,
17469    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17470    pub signal_quality: u8,
17471    #[doc = "1: Ring call pending, 0: No call pending."]
17472    pub ring_pending: u8,
17473    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17474    pub tx_session_pending: u8,
17475    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17476    pub rx_session_pending: u8,
17477}
17478impl ISBD_LINK_STATUS_DATA {
17479    pub const ENCODED_LEN: usize = 24usize;
17480    pub const DEFAULT: Self = Self {
17481        timestamp: 0_u64,
17482        last_heartbeat: 0_u64,
17483        failed_sessions: 0_u16,
17484        successful_sessions: 0_u16,
17485        signal_quality: 0_u8,
17486        ring_pending: 0_u8,
17487        tx_session_pending: 0_u8,
17488        rx_session_pending: 0_u8,
17489    };
17490    #[cfg(feature = "arbitrary")]
17491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17492        use arbitrary::{Arbitrary, Unstructured};
17493        let mut buf = [0u8; 1024];
17494        rng.fill_bytes(&mut buf);
17495        let mut unstructured = Unstructured::new(&buf);
17496        Self::arbitrary(&mut unstructured).unwrap_or_default()
17497    }
17498}
17499impl Default for ISBD_LINK_STATUS_DATA {
17500    fn default() -> Self {
17501        Self::DEFAULT.clone()
17502    }
17503}
17504impl MessageData for ISBD_LINK_STATUS_DATA {
17505    type Message = MavMessage;
17506    const ID: u32 = 335u32;
17507    const NAME: &'static str = "ISBD_LINK_STATUS";
17508    const EXTRA_CRC: u8 = 225u8;
17509    const ENCODED_LEN: usize = 24usize;
17510    fn deser(
17511        _version: MavlinkVersion,
17512        __input: &[u8],
17513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17514        let avail_len = __input.len();
17515        let mut payload_buf = [0; Self::ENCODED_LEN];
17516        let mut buf = if avail_len < Self::ENCODED_LEN {
17517            payload_buf[0..avail_len].copy_from_slice(__input);
17518            Bytes::new(&payload_buf)
17519        } else {
17520            Bytes::new(__input)
17521        };
17522        let mut __struct = Self::default();
17523        __struct.timestamp = buf.get_u64_le()?;
17524        __struct.last_heartbeat = buf.get_u64_le()?;
17525        __struct.failed_sessions = buf.get_u16_le()?;
17526        __struct.successful_sessions = buf.get_u16_le()?;
17527        __struct.signal_quality = buf.get_u8()?;
17528        __struct.ring_pending = buf.get_u8()?;
17529        __struct.tx_session_pending = buf.get_u8()?;
17530        __struct.rx_session_pending = buf.get_u8()?;
17531        Ok(__struct)
17532    }
17533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17534        let mut __tmp = BytesMut::new(bytes);
17535        #[allow(clippy::absurd_extreme_comparisons)]
17536        #[allow(unused_comparisons)]
17537        if __tmp.remaining() < Self::ENCODED_LEN {
17538            panic!(
17539                "buffer is too small (need {} bytes, but got {})",
17540                Self::ENCODED_LEN,
17541                __tmp.remaining(),
17542            )
17543        }
17544        __tmp.put_u64_le(self.timestamp);
17545        __tmp.put_u64_le(self.last_heartbeat);
17546        __tmp.put_u16_le(self.failed_sessions);
17547        __tmp.put_u16_le(self.successful_sessions);
17548        __tmp.put_u8(self.signal_quality);
17549        __tmp.put_u8(self.ring_pending);
17550        __tmp.put_u8(self.tx_session_pending);
17551        __tmp.put_u8(self.rx_session_pending);
17552        if matches!(version, MavlinkVersion::V2) {
17553            let len = __tmp.len();
17554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17555        } else {
17556            __tmp.len()
17557        }
17558    }
17559}
17560#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17561#[doc = ""]
17562#[doc = "ID: 149"]
17563#[derive(Debug, Clone, PartialEq)]
17564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17566#[cfg_attr(feature = "ts", derive(TS))]
17567#[cfg_attr(feature = "ts", ts(export))]
17568pub struct LANDING_TARGET_DATA {
17569    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17570    pub time_usec: u64,
17571    #[doc = "X-axis angular offset of the target from the center of the image"]
17572    pub angle_x: f32,
17573    #[doc = "Y-axis angular offset of the target from the center of the image"]
17574    pub angle_y: f32,
17575    #[doc = "Distance to the target from the vehicle"]
17576    pub distance: f32,
17577    #[doc = "Size of target along x-axis"]
17578    pub size_x: f32,
17579    #[doc = "Size of target along y-axis"]
17580    pub size_y: f32,
17581    #[doc = "The ID of the target if multiple targets are present"]
17582    pub target_num: u8,
17583    #[doc = "Coordinate frame used for following fields."]
17584    pub frame: MavFrame,
17585    #[doc = "X Position of the landing target in MAV_FRAME"]
17586    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17587    pub x: f32,
17588    #[doc = "Y Position of the landing target in MAV_FRAME"]
17589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17590    pub y: f32,
17591    #[doc = "Z Position of the landing target in MAV_FRAME"]
17592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17593    pub z: f32,
17594    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17596    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17597    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17598    pub q: [f32; 4],
17599    #[doc = "Type of landing target"]
17600    #[cfg_attr(feature = "serde", serde(default))]
17601    pub mavtype: LandingTargetType,
17602    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17604    pub position_valid: u8,
17605}
17606impl LANDING_TARGET_DATA {
17607    pub const ENCODED_LEN: usize = 60usize;
17608    pub const DEFAULT: Self = Self {
17609        time_usec: 0_u64,
17610        angle_x: 0.0_f32,
17611        angle_y: 0.0_f32,
17612        distance: 0.0_f32,
17613        size_x: 0.0_f32,
17614        size_y: 0.0_f32,
17615        target_num: 0_u8,
17616        frame: MavFrame::DEFAULT,
17617        x: 0.0_f32,
17618        y: 0.0_f32,
17619        z: 0.0_f32,
17620        q: [0.0_f32; 4usize],
17621        mavtype: LandingTargetType::DEFAULT,
17622        position_valid: 0_u8,
17623    };
17624    #[cfg(feature = "arbitrary")]
17625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17626        use arbitrary::{Arbitrary, Unstructured};
17627        let mut buf = [0u8; 1024];
17628        rng.fill_bytes(&mut buf);
17629        let mut unstructured = Unstructured::new(&buf);
17630        Self::arbitrary(&mut unstructured).unwrap_or_default()
17631    }
17632}
17633impl Default for LANDING_TARGET_DATA {
17634    fn default() -> Self {
17635        Self::DEFAULT.clone()
17636    }
17637}
17638impl MessageData for LANDING_TARGET_DATA {
17639    type Message = MavMessage;
17640    const ID: u32 = 149u32;
17641    const NAME: &'static str = "LANDING_TARGET";
17642    const EXTRA_CRC: u8 = 200u8;
17643    const ENCODED_LEN: usize = 60usize;
17644    fn deser(
17645        _version: MavlinkVersion,
17646        __input: &[u8],
17647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17648        let avail_len = __input.len();
17649        let mut payload_buf = [0; Self::ENCODED_LEN];
17650        let mut buf = if avail_len < Self::ENCODED_LEN {
17651            payload_buf[0..avail_len].copy_from_slice(__input);
17652            Bytes::new(&payload_buf)
17653        } else {
17654            Bytes::new(__input)
17655        };
17656        let mut __struct = Self::default();
17657        __struct.time_usec = buf.get_u64_le()?;
17658        __struct.angle_x = buf.get_f32_le()?;
17659        __struct.angle_y = buf.get_f32_le()?;
17660        __struct.distance = buf.get_f32_le()?;
17661        __struct.size_x = buf.get_f32_le()?;
17662        __struct.size_y = buf.get_f32_le()?;
17663        __struct.target_num = buf.get_u8()?;
17664        let tmp = buf.get_u8()?;
17665        __struct.frame =
17666            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17667                enum_type: "MavFrame",
17668                value: tmp as u64,
17669            })?;
17670        __struct.x = buf.get_f32_le()?;
17671        __struct.y = buf.get_f32_le()?;
17672        __struct.z = buf.get_f32_le()?;
17673        for v in &mut __struct.q {
17674            let val = buf.get_f32_le()?;
17675            *v = val;
17676        }
17677        let tmp = buf.get_u8()?;
17678        __struct.mavtype =
17679            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17680                enum_type: "LandingTargetType",
17681                value: tmp as u64,
17682            })?;
17683        __struct.position_valid = buf.get_u8()?;
17684        Ok(__struct)
17685    }
17686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17687        let mut __tmp = BytesMut::new(bytes);
17688        #[allow(clippy::absurd_extreme_comparisons)]
17689        #[allow(unused_comparisons)]
17690        if __tmp.remaining() < Self::ENCODED_LEN {
17691            panic!(
17692                "buffer is too small (need {} bytes, but got {})",
17693                Self::ENCODED_LEN,
17694                __tmp.remaining(),
17695            )
17696        }
17697        __tmp.put_u64_le(self.time_usec);
17698        __tmp.put_f32_le(self.angle_x);
17699        __tmp.put_f32_le(self.angle_y);
17700        __tmp.put_f32_le(self.distance);
17701        __tmp.put_f32_le(self.size_x);
17702        __tmp.put_f32_le(self.size_y);
17703        __tmp.put_u8(self.target_num);
17704        __tmp.put_u8(self.frame as u8);
17705        if matches!(version, MavlinkVersion::V2) {
17706            __tmp.put_f32_le(self.x);
17707            __tmp.put_f32_le(self.y);
17708            __tmp.put_f32_le(self.z);
17709            for val in &self.q {
17710                __tmp.put_f32_le(*val);
17711            }
17712            __tmp.put_u8(self.mavtype as u8);
17713            __tmp.put_u8(self.position_valid);
17714            let len = __tmp.len();
17715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17716        } else {
17717            __tmp.len()
17718        }
17719    }
17720}
17721#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17722#[doc = ""]
17723#[doc = "ID: 8"]
17724#[derive(Debug, Clone, PartialEq)]
17725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17727#[cfg_attr(feature = "ts", derive(TS))]
17728#[cfg_attr(feature = "ts", ts(export))]
17729pub struct LINK_NODE_STATUS_DATA {
17730    #[doc = "Timestamp (time since system boot)."]
17731    pub timestamp: u64,
17732    #[doc = "Transmit rate"]
17733    pub tx_rate: u32,
17734    #[doc = "Receive rate"]
17735    pub rx_rate: u32,
17736    #[doc = "Messages sent"]
17737    pub messages_sent: u32,
17738    #[doc = "Messages received (estimated from counting seq)"]
17739    pub messages_received: u32,
17740    #[doc = "Messages lost (estimated from counting seq)"]
17741    pub messages_lost: u32,
17742    #[doc = "Number of bytes that could not be parsed correctly."]
17743    pub rx_parse_err: u16,
17744    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17745    pub tx_overflows: u16,
17746    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17747    pub rx_overflows: u16,
17748    #[doc = "Remaining free transmit buffer space"]
17749    pub tx_buf: u8,
17750    #[doc = "Remaining free receive buffer space"]
17751    pub rx_buf: u8,
17752}
17753impl LINK_NODE_STATUS_DATA {
17754    pub const ENCODED_LEN: usize = 36usize;
17755    pub const DEFAULT: Self = Self {
17756        timestamp: 0_u64,
17757        tx_rate: 0_u32,
17758        rx_rate: 0_u32,
17759        messages_sent: 0_u32,
17760        messages_received: 0_u32,
17761        messages_lost: 0_u32,
17762        rx_parse_err: 0_u16,
17763        tx_overflows: 0_u16,
17764        rx_overflows: 0_u16,
17765        tx_buf: 0_u8,
17766        rx_buf: 0_u8,
17767    };
17768    #[cfg(feature = "arbitrary")]
17769    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17770        use arbitrary::{Arbitrary, Unstructured};
17771        let mut buf = [0u8; 1024];
17772        rng.fill_bytes(&mut buf);
17773        let mut unstructured = Unstructured::new(&buf);
17774        Self::arbitrary(&mut unstructured).unwrap_or_default()
17775    }
17776}
17777impl Default for LINK_NODE_STATUS_DATA {
17778    fn default() -> Self {
17779        Self::DEFAULT.clone()
17780    }
17781}
17782impl MessageData for LINK_NODE_STATUS_DATA {
17783    type Message = MavMessage;
17784    const ID: u32 = 8u32;
17785    const NAME: &'static str = "LINK_NODE_STATUS";
17786    const EXTRA_CRC: u8 = 117u8;
17787    const ENCODED_LEN: usize = 36usize;
17788    fn deser(
17789        _version: MavlinkVersion,
17790        __input: &[u8],
17791    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17792        let avail_len = __input.len();
17793        let mut payload_buf = [0; Self::ENCODED_LEN];
17794        let mut buf = if avail_len < Self::ENCODED_LEN {
17795            payload_buf[0..avail_len].copy_from_slice(__input);
17796            Bytes::new(&payload_buf)
17797        } else {
17798            Bytes::new(__input)
17799        };
17800        let mut __struct = Self::default();
17801        __struct.timestamp = buf.get_u64_le()?;
17802        __struct.tx_rate = buf.get_u32_le()?;
17803        __struct.rx_rate = buf.get_u32_le()?;
17804        __struct.messages_sent = buf.get_u32_le()?;
17805        __struct.messages_received = buf.get_u32_le()?;
17806        __struct.messages_lost = buf.get_u32_le()?;
17807        __struct.rx_parse_err = buf.get_u16_le()?;
17808        __struct.tx_overflows = buf.get_u16_le()?;
17809        __struct.rx_overflows = buf.get_u16_le()?;
17810        __struct.tx_buf = buf.get_u8()?;
17811        __struct.rx_buf = buf.get_u8()?;
17812        Ok(__struct)
17813    }
17814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17815        let mut __tmp = BytesMut::new(bytes);
17816        #[allow(clippy::absurd_extreme_comparisons)]
17817        #[allow(unused_comparisons)]
17818        if __tmp.remaining() < Self::ENCODED_LEN {
17819            panic!(
17820                "buffer is too small (need {} bytes, but got {})",
17821                Self::ENCODED_LEN,
17822                __tmp.remaining(),
17823            )
17824        }
17825        __tmp.put_u64_le(self.timestamp);
17826        __tmp.put_u32_le(self.tx_rate);
17827        __tmp.put_u32_le(self.rx_rate);
17828        __tmp.put_u32_le(self.messages_sent);
17829        __tmp.put_u32_le(self.messages_received);
17830        __tmp.put_u32_le(self.messages_lost);
17831        __tmp.put_u16_le(self.rx_parse_err);
17832        __tmp.put_u16_le(self.tx_overflows);
17833        __tmp.put_u16_le(self.rx_overflows);
17834        __tmp.put_u8(self.tx_buf);
17835        __tmp.put_u8(self.rx_buf);
17836        if matches!(version, MavlinkVersion::V2) {
17837            let len = __tmp.len();
17838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17839        } else {
17840            __tmp.len()
17841        }
17842    }
17843}
17844#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17845#[doc = ""]
17846#[doc = "ID: 32"]
17847#[derive(Debug, Clone, PartialEq)]
17848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17850#[cfg_attr(feature = "ts", derive(TS))]
17851#[cfg_attr(feature = "ts", ts(export))]
17852pub struct LOCAL_POSITION_NED_DATA {
17853    #[doc = "Timestamp (time since system boot)."]
17854    pub time_boot_ms: u32,
17855    #[doc = "X Position"]
17856    pub x: f32,
17857    #[doc = "Y Position"]
17858    pub y: f32,
17859    #[doc = "Z Position"]
17860    pub z: f32,
17861    #[doc = "X Speed"]
17862    pub vx: f32,
17863    #[doc = "Y Speed"]
17864    pub vy: f32,
17865    #[doc = "Z Speed"]
17866    pub vz: f32,
17867}
17868impl LOCAL_POSITION_NED_DATA {
17869    pub const ENCODED_LEN: usize = 28usize;
17870    pub const DEFAULT: Self = Self {
17871        time_boot_ms: 0_u32,
17872        x: 0.0_f32,
17873        y: 0.0_f32,
17874        z: 0.0_f32,
17875        vx: 0.0_f32,
17876        vy: 0.0_f32,
17877        vz: 0.0_f32,
17878    };
17879    #[cfg(feature = "arbitrary")]
17880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17881        use arbitrary::{Arbitrary, Unstructured};
17882        let mut buf = [0u8; 1024];
17883        rng.fill_bytes(&mut buf);
17884        let mut unstructured = Unstructured::new(&buf);
17885        Self::arbitrary(&mut unstructured).unwrap_or_default()
17886    }
17887}
17888impl Default for LOCAL_POSITION_NED_DATA {
17889    fn default() -> Self {
17890        Self::DEFAULT.clone()
17891    }
17892}
17893impl MessageData for LOCAL_POSITION_NED_DATA {
17894    type Message = MavMessage;
17895    const ID: u32 = 32u32;
17896    const NAME: &'static str = "LOCAL_POSITION_NED";
17897    const EXTRA_CRC: u8 = 185u8;
17898    const ENCODED_LEN: usize = 28usize;
17899    fn deser(
17900        _version: MavlinkVersion,
17901        __input: &[u8],
17902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17903        let avail_len = __input.len();
17904        let mut payload_buf = [0; Self::ENCODED_LEN];
17905        let mut buf = if avail_len < Self::ENCODED_LEN {
17906            payload_buf[0..avail_len].copy_from_slice(__input);
17907            Bytes::new(&payload_buf)
17908        } else {
17909            Bytes::new(__input)
17910        };
17911        let mut __struct = Self::default();
17912        __struct.time_boot_ms = buf.get_u32_le()?;
17913        __struct.x = buf.get_f32_le()?;
17914        __struct.y = buf.get_f32_le()?;
17915        __struct.z = buf.get_f32_le()?;
17916        __struct.vx = buf.get_f32_le()?;
17917        __struct.vy = buf.get_f32_le()?;
17918        __struct.vz = buf.get_f32_le()?;
17919        Ok(__struct)
17920    }
17921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17922        let mut __tmp = BytesMut::new(bytes);
17923        #[allow(clippy::absurd_extreme_comparisons)]
17924        #[allow(unused_comparisons)]
17925        if __tmp.remaining() < Self::ENCODED_LEN {
17926            panic!(
17927                "buffer is too small (need {} bytes, but got {})",
17928                Self::ENCODED_LEN,
17929                __tmp.remaining(),
17930            )
17931        }
17932        __tmp.put_u32_le(self.time_boot_ms);
17933        __tmp.put_f32_le(self.x);
17934        __tmp.put_f32_le(self.y);
17935        __tmp.put_f32_le(self.z);
17936        __tmp.put_f32_le(self.vx);
17937        __tmp.put_f32_le(self.vy);
17938        __tmp.put_f32_le(self.vz);
17939        if matches!(version, MavlinkVersion::V2) {
17940            let len = __tmp.len();
17941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17942        } else {
17943            __tmp.len()
17944        }
17945    }
17946}
17947#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17948#[doc = ""]
17949#[doc = "ID: 64"]
17950#[derive(Debug, Clone, PartialEq)]
17951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17953#[cfg_attr(feature = "ts", derive(TS))]
17954#[cfg_attr(feature = "ts", ts(export))]
17955pub struct LOCAL_POSITION_NED_COV_DATA {
17956    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17957    pub time_usec: u64,
17958    #[doc = "X Position"]
17959    pub x: f32,
17960    #[doc = "Y Position"]
17961    pub y: f32,
17962    #[doc = "Z Position"]
17963    pub z: f32,
17964    #[doc = "X Speed"]
17965    pub vx: f32,
17966    #[doc = "Y Speed"]
17967    pub vy: f32,
17968    #[doc = "Z Speed"]
17969    pub vz: f32,
17970    #[doc = "X Acceleration"]
17971    pub ax: f32,
17972    #[doc = "Y Acceleration"]
17973    pub ay: f32,
17974    #[doc = "Z Acceleration"]
17975    pub az: f32,
17976    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17977    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17978    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17979    pub covariance: [f32; 45],
17980    #[doc = "Class id of the estimator this estimate originated from."]
17981    pub estimator_type: MavEstimatorType,
17982}
17983impl LOCAL_POSITION_NED_COV_DATA {
17984    pub const ENCODED_LEN: usize = 225usize;
17985    pub const DEFAULT: Self = Self {
17986        time_usec: 0_u64,
17987        x: 0.0_f32,
17988        y: 0.0_f32,
17989        z: 0.0_f32,
17990        vx: 0.0_f32,
17991        vy: 0.0_f32,
17992        vz: 0.0_f32,
17993        ax: 0.0_f32,
17994        ay: 0.0_f32,
17995        az: 0.0_f32,
17996        covariance: [0.0_f32; 45usize],
17997        estimator_type: MavEstimatorType::DEFAULT,
17998    };
17999    #[cfg(feature = "arbitrary")]
18000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18001        use arbitrary::{Arbitrary, Unstructured};
18002        let mut buf = [0u8; 1024];
18003        rng.fill_bytes(&mut buf);
18004        let mut unstructured = Unstructured::new(&buf);
18005        Self::arbitrary(&mut unstructured).unwrap_or_default()
18006    }
18007}
18008impl Default for LOCAL_POSITION_NED_COV_DATA {
18009    fn default() -> Self {
18010        Self::DEFAULT.clone()
18011    }
18012}
18013impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18014    type Message = MavMessage;
18015    const ID: u32 = 64u32;
18016    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18017    const EXTRA_CRC: u8 = 191u8;
18018    const ENCODED_LEN: usize = 225usize;
18019    fn deser(
18020        _version: MavlinkVersion,
18021        __input: &[u8],
18022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18023        let avail_len = __input.len();
18024        let mut payload_buf = [0; Self::ENCODED_LEN];
18025        let mut buf = if avail_len < Self::ENCODED_LEN {
18026            payload_buf[0..avail_len].copy_from_slice(__input);
18027            Bytes::new(&payload_buf)
18028        } else {
18029            Bytes::new(__input)
18030        };
18031        let mut __struct = Self::default();
18032        __struct.time_usec = buf.get_u64_le()?;
18033        __struct.x = buf.get_f32_le()?;
18034        __struct.y = buf.get_f32_le()?;
18035        __struct.z = buf.get_f32_le()?;
18036        __struct.vx = buf.get_f32_le()?;
18037        __struct.vy = buf.get_f32_le()?;
18038        __struct.vz = buf.get_f32_le()?;
18039        __struct.ax = buf.get_f32_le()?;
18040        __struct.ay = buf.get_f32_le()?;
18041        __struct.az = buf.get_f32_le()?;
18042        for v in &mut __struct.covariance {
18043            let val = buf.get_f32_le()?;
18044            *v = val;
18045        }
18046        let tmp = buf.get_u8()?;
18047        __struct.estimator_type =
18048            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18049                enum_type: "MavEstimatorType",
18050                value: tmp as u64,
18051            })?;
18052        Ok(__struct)
18053    }
18054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18055        let mut __tmp = BytesMut::new(bytes);
18056        #[allow(clippy::absurd_extreme_comparisons)]
18057        #[allow(unused_comparisons)]
18058        if __tmp.remaining() < Self::ENCODED_LEN {
18059            panic!(
18060                "buffer is too small (need {} bytes, but got {})",
18061                Self::ENCODED_LEN,
18062                __tmp.remaining(),
18063            )
18064        }
18065        __tmp.put_u64_le(self.time_usec);
18066        __tmp.put_f32_le(self.x);
18067        __tmp.put_f32_le(self.y);
18068        __tmp.put_f32_le(self.z);
18069        __tmp.put_f32_le(self.vx);
18070        __tmp.put_f32_le(self.vy);
18071        __tmp.put_f32_le(self.vz);
18072        __tmp.put_f32_le(self.ax);
18073        __tmp.put_f32_le(self.ay);
18074        __tmp.put_f32_le(self.az);
18075        for val in &self.covariance {
18076            __tmp.put_f32_le(*val);
18077        }
18078        __tmp.put_u8(self.estimator_type as u8);
18079        if matches!(version, MavlinkVersion::V2) {
18080            let len = __tmp.len();
18081            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18082        } else {
18083            __tmp.len()
18084        }
18085    }
18086}
18087#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18088#[doc = ""]
18089#[doc = "ID: 89"]
18090#[derive(Debug, Clone, PartialEq)]
18091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18093#[cfg_attr(feature = "ts", derive(TS))]
18094#[cfg_attr(feature = "ts", ts(export))]
18095pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18096    #[doc = "Timestamp (time since system boot)."]
18097    pub time_boot_ms: u32,
18098    #[doc = "X Position"]
18099    pub x: f32,
18100    #[doc = "Y Position"]
18101    pub y: f32,
18102    #[doc = "Z Position"]
18103    pub z: f32,
18104    #[doc = "Roll"]
18105    pub roll: f32,
18106    #[doc = "Pitch"]
18107    pub pitch: f32,
18108    #[doc = "Yaw"]
18109    pub yaw: f32,
18110}
18111impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18112    pub const ENCODED_LEN: usize = 28usize;
18113    pub const DEFAULT: Self = Self {
18114        time_boot_ms: 0_u32,
18115        x: 0.0_f32,
18116        y: 0.0_f32,
18117        z: 0.0_f32,
18118        roll: 0.0_f32,
18119        pitch: 0.0_f32,
18120        yaw: 0.0_f32,
18121    };
18122    #[cfg(feature = "arbitrary")]
18123    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18124        use arbitrary::{Arbitrary, Unstructured};
18125        let mut buf = [0u8; 1024];
18126        rng.fill_bytes(&mut buf);
18127        let mut unstructured = Unstructured::new(&buf);
18128        Self::arbitrary(&mut unstructured).unwrap_or_default()
18129    }
18130}
18131impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18132    fn default() -> Self {
18133        Self::DEFAULT.clone()
18134    }
18135}
18136impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18137    type Message = MavMessage;
18138    const ID: u32 = 89u32;
18139    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18140    const EXTRA_CRC: u8 = 231u8;
18141    const ENCODED_LEN: usize = 28usize;
18142    fn deser(
18143        _version: MavlinkVersion,
18144        __input: &[u8],
18145    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18146        let avail_len = __input.len();
18147        let mut payload_buf = [0; Self::ENCODED_LEN];
18148        let mut buf = if avail_len < Self::ENCODED_LEN {
18149            payload_buf[0..avail_len].copy_from_slice(__input);
18150            Bytes::new(&payload_buf)
18151        } else {
18152            Bytes::new(__input)
18153        };
18154        let mut __struct = Self::default();
18155        __struct.time_boot_ms = buf.get_u32_le()?;
18156        __struct.x = buf.get_f32_le()?;
18157        __struct.y = buf.get_f32_le()?;
18158        __struct.z = buf.get_f32_le()?;
18159        __struct.roll = buf.get_f32_le()?;
18160        __struct.pitch = buf.get_f32_le()?;
18161        __struct.yaw = buf.get_f32_le()?;
18162        Ok(__struct)
18163    }
18164    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18165        let mut __tmp = BytesMut::new(bytes);
18166        #[allow(clippy::absurd_extreme_comparisons)]
18167        #[allow(unused_comparisons)]
18168        if __tmp.remaining() < Self::ENCODED_LEN {
18169            panic!(
18170                "buffer is too small (need {} bytes, but got {})",
18171                Self::ENCODED_LEN,
18172                __tmp.remaining(),
18173            )
18174        }
18175        __tmp.put_u32_le(self.time_boot_ms);
18176        __tmp.put_f32_le(self.x);
18177        __tmp.put_f32_le(self.y);
18178        __tmp.put_f32_le(self.z);
18179        __tmp.put_f32_le(self.roll);
18180        __tmp.put_f32_le(self.pitch);
18181        __tmp.put_f32_le(self.yaw);
18182        if matches!(version, MavlinkVersion::V2) {
18183            let len = __tmp.len();
18184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18185        } else {
18186            __tmp.len()
18187        }
18188    }
18189}
18190#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18191#[doc = ""]
18192#[doc = "ID: 268"]
18193#[derive(Debug, Clone, PartialEq)]
18194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18196#[cfg_attr(feature = "ts", derive(TS))]
18197#[cfg_attr(feature = "ts", ts(export))]
18198pub struct LOGGING_ACK_DATA {
18199    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18200    pub sequence: u16,
18201    #[doc = "system ID of the target"]
18202    pub target_system: u8,
18203    #[doc = "component ID of the target"]
18204    pub target_component: u8,
18205}
18206impl LOGGING_ACK_DATA {
18207    pub const ENCODED_LEN: usize = 4usize;
18208    pub const DEFAULT: Self = Self {
18209        sequence: 0_u16,
18210        target_system: 0_u8,
18211        target_component: 0_u8,
18212    };
18213    #[cfg(feature = "arbitrary")]
18214    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18215        use arbitrary::{Arbitrary, Unstructured};
18216        let mut buf = [0u8; 1024];
18217        rng.fill_bytes(&mut buf);
18218        let mut unstructured = Unstructured::new(&buf);
18219        Self::arbitrary(&mut unstructured).unwrap_or_default()
18220    }
18221}
18222impl Default for LOGGING_ACK_DATA {
18223    fn default() -> Self {
18224        Self::DEFAULT.clone()
18225    }
18226}
18227impl MessageData for LOGGING_ACK_DATA {
18228    type Message = MavMessage;
18229    const ID: u32 = 268u32;
18230    const NAME: &'static str = "LOGGING_ACK";
18231    const EXTRA_CRC: u8 = 14u8;
18232    const ENCODED_LEN: usize = 4usize;
18233    fn deser(
18234        _version: MavlinkVersion,
18235        __input: &[u8],
18236    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18237        let avail_len = __input.len();
18238        let mut payload_buf = [0; Self::ENCODED_LEN];
18239        let mut buf = if avail_len < Self::ENCODED_LEN {
18240            payload_buf[0..avail_len].copy_from_slice(__input);
18241            Bytes::new(&payload_buf)
18242        } else {
18243            Bytes::new(__input)
18244        };
18245        let mut __struct = Self::default();
18246        __struct.sequence = buf.get_u16_le()?;
18247        __struct.target_system = buf.get_u8()?;
18248        __struct.target_component = buf.get_u8()?;
18249        Ok(__struct)
18250    }
18251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18252        let mut __tmp = BytesMut::new(bytes);
18253        #[allow(clippy::absurd_extreme_comparisons)]
18254        #[allow(unused_comparisons)]
18255        if __tmp.remaining() < Self::ENCODED_LEN {
18256            panic!(
18257                "buffer is too small (need {} bytes, but got {})",
18258                Self::ENCODED_LEN,
18259                __tmp.remaining(),
18260            )
18261        }
18262        __tmp.put_u16_le(self.sequence);
18263        __tmp.put_u8(self.target_system);
18264        __tmp.put_u8(self.target_component);
18265        if matches!(version, MavlinkVersion::V2) {
18266            let len = __tmp.len();
18267            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18268        } else {
18269            __tmp.len()
18270        }
18271    }
18272}
18273#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18274#[doc = ""]
18275#[doc = "ID: 266"]
18276#[derive(Debug, Clone, PartialEq)]
18277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18279#[cfg_attr(feature = "ts", derive(TS))]
18280#[cfg_attr(feature = "ts", ts(export))]
18281pub struct LOGGING_DATA_DATA {
18282    #[doc = "sequence number (can wrap)"]
18283    pub sequence: u16,
18284    #[doc = "system ID of the target"]
18285    pub target_system: u8,
18286    #[doc = "component ID of the target"]
18287    pub target_component: u8,
18288    #[doc = "data length"]
18289    pub length: u8,
18290    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18291    pub first_message_offset: u8,
18292    #[doc = "logged data"]
18293    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18294    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18295    pub data: [u8; 249],
18296}
18297impl LOGGING_DATA_DATA {
18298    pub const ENCODED_LEN: usize = 255usize;
18299    pub const DEFAULT: Self = Self {
18300        sequence: 0_u16,
18301        target_system: 0_u8,
18302        target_component: 0_u8,
18303        length: 0_u8,
18304        first_message_offset: 0_u8,
18305        data: [0_u8; 249usize],
18306    };
18307    #[cfg(feature = "arbitrary")]
18308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18309        use arbitrary::{Arbitrary, Unstructured};
18310        let mut buf = [0u8; 1024];
18311        rng.fill_bytes(&mut buf);
18312        let mut unstructured = Unstructured::new(&buf);
18313        Self::arbitrary(&mut unstructured).unwrap_or_default()
18314    }
18315}
18316impl Default for LOGGING_DATA_DATA {
18317    fn default() -> Self {
18318        Self::DEFAULT.clone()
18319    }
18320}
18321impl MessageData for LOGGING_DATA_DATA {
18322    type Message = MavMessage;
18323    const ID: u32 = 266u32;
18324    const NAME: &'static str = "LOGGING_DATA";
18325    const EXTRA_CRC: u8 = 193u8;
18326    const ENCODED_LEN: usize = 255usize;
18327    fn deser(
18328        _version: MavlinkVersion,
18329        __input: &[u8],
18330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18331        let avail_len = __input.len();
18332        let mut payload_buf = [0; Self::ENCODED_LEN];
18333        let mut buf = if avail_len < Self::ENCODED_LEN {
18334            payload_buf[0..avail_len].copy_from_slice(__input);
18335            Bytes::new(&payload_buf)
18336        } else {
18337            Bytes::new(__input)
18338        };
18339        let mut __struct = Self::default();
18340        __struct.sequence = buf.get_u16_le()?;
18341        __struct.target_system = buf.get_u8()?;
18342        __struct.target_component = buf.get_u8()?;
18343        __struct.length = buf.get_u8()?;
18344        __struct.first_message_offset = buf.get_u8()?;
18345        for v in &mut __struct.data {
18346            let val = buf.get_u8()?;
18347            *v = val;
18348        }
18349        Ok(__struct)
18350    }
18351    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18352        let mut __tmp = BytesMut::new(bytes);
18353        #[allow(clippy::absurd_extreme_comparisons)]
18354        #[allow(unused_comparisons)]
18355        if __tmp.remaining() < Self::ENCODED_LEN {
18356            panic!(
18357                "buffer is too small (need {} bytes, but got {})",
18358                Self::ENCODED_LEN,
18359                __tmp.remaining(),
18360            )
18361        }
18362        __tmp.put_u16_le(self.sequence);
18363        __tmp.put_u8(self.target_system);
18364        __tmp.put_u8(self.target_component);
18365        __tmp.put_u8(self.length);
18366        __tmp.put_u8(self.first_message_offset);
18367        for val in &self.data {
18368            __tmp.put_u8(*val);
18369        }
18370        if matches!(version, MavlinkVersion::V2) {
18371            let len = __tmp.len();
18372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18373        } else {
18374            __tmp.len()
18375        }
18376    }
18377}
18378#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18379#[doc = ""]
18380#[doc = "ID: 267"]
18381#[derive(Debug, Clone, PartialEq)]
18382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18384#[cfg_attr(feature = "ts", derive(TS))]
18385#[cfg_attr(feature = "ts", ts(export))]
18386pub struct LOGGING_DATA_ACKED_DATA {
18387    #[doc = "sequence number (can wrap)"]
18388    pub sequence: u16,
18389    #[doc = "system ID of the target"]
18390    pub target_system: u8,
18391    #[doc = "component ID of the target"]
18392    pub target_component: u8,
18393    #[doc = "data length"]
18394    pub length: u8,
18395    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18396    pub first_message_offset: u8,
18397    #[doc = "logged data"]
18398    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18399    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18400    pub data: [u8; 249],
18401}
18402impl LOGGING_DATA_ACKED_DATA {
18403    pub const ENCODED_LEN: usize = 255usize;
18404    pub const DEFAULT: Self = Self {
18405        sequence: 0_u16,
18406        target_system: 0_u8,
18407        target_component: 0_u8,
18408        length: 0_u8,
18409        first_message_offset: 0_u8,
18410        data: [0_u8; 249usize],
18411    };
18412    #[cfg(feature = "arbitrary")]
18413    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18414        use arbitrary::{Arbitrary, Unstructured};
18415        let mut buf = [0u8; 1024];
18416        rng.fill_bytes(&mut buf);
18417        let mut unstructured = Unstructured::new(&buf);
18418        Self::arbitrary(&mut unstructured).unwrap_or_default()
18419    }
18420}
18421impl Default for LOGGING_DATA_ACKED_DATA {
18422    fn default() -> Self {
18423        Self::DEFAULT.clone()
18424    }
18425}
18426impl MessageData for LOGGING_DATA_ACKED_DATA {
18427    type Message = MavMessage;
18428    const ID: u32 = 267u32;
18429    const NAME: &'static str = "LOGGING_DATA_ACKED";
18430    const EXTRA_CRC: u8 = 35u8;
18431    const ENCODED_LEN: usize = 255usize;
18432    fn deser(
18433        _version: MavlinkVersion,
18434        __input: &[u8],
18435    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18436        let avail_len = __input.len();
18437        let mut payload_buf = [0; Self::ENCODED_LEN];
18438        let mut buf = if avail_len < Self::ENCODED_LEN {
18439            payload_buf[0..avail_len].copy_from_slice(__input);
18440            Bytes::new(&payload_buf)
18441        } else {
18442            Bytes::new(__input)
18443        };
18444        let mut __struct = Self::default();
18445        __struct.sequence = buf.get_u16_le()?;
18446        __struct.target_system = buf.get_u8()?;
18447        __struct.target_component = buf.get_u8()?;
18448        __struct.length = buf.get_u8()?;
18449        __struct.first_message_offset = buf.get_u8()?;
18450        for v in &mut __struct.data {
18451            let val = buf.get_u8()?;
18452            *v = val;
18453        }
18454        Ok(__struct)
18455    }
18456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18457        let mut __tmp = BytesMut::new(bytes);
18458        #[allow(clippy::absurd_extreme_comparisons)]
18459        #[allow(unused_comparisons)]
18460        if __tmp.remaining() < Self::ENCODED_LEN {
18461            panic!(
18462                "buffer is too small (need {} bytes, but got {})",
18463                Self::ENCODED_LEN,
18464                __tmp.remaining(),
18465            )
18466        }
18467        __tmp.put_u16_le(self.sequence);
18468        __tmp.put_u8(self.target_system);
18469        __tmp.put_u8(self.target_component);
18470        __tmp.put_u8(self.length);
18471        __tmp.put_u8(self.first_message_offset);
18472        for val in &self.data {
18473            __tmp.put_u8(*val);
18474        }
18475        if matches!(version, MavlinkVersion::V2) {
18476            let len = __tmp.len();
18477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18478        } else {
18479            __tmp.len()
18480        }
18481    }
18482}
18483#[doc = "Reply to LOG_REQUEST_DATA."]
18484#[doc = ""]
18485#[doc = "ID: 120"]
18486#[derive(Debug, Clone, PartialEq)]
18487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18489#[cfg_attr(feature = "ts", derive(TS))]
18490#[cfg_attr(feature = "ts", ts(export))]
18491pub struct LOG_DATA_DATA {
18492    #[doc = "Offset into the log"]
18493    pub ofs: u32,
18494    #[doc = "Log id (from LOG_ENTRY reply)"]
18495    pub id: u16,
18496    #[doc = "Number of bytes (zero for end of log)"]
18497    pub count: u8,
18498    #[doc = "log data"]
18499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18501    pub data: [u8; 90],
18502}
18503impl LOG_DATA_DATA {
18504    pub const ENCODED_LEN: usize = 97usize;
18505    pub const DEFAULT: Self = Self {
18506        ofs: 0_u32,
18507        id: 0_u16,
18508        count: 0_u8,
18509        data: [0_u8; 90usize],
18510    };
18511    #[cfg(feature = "arbitrary")]
18512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18513        use arbitrary::{Arbitrary, Unstructured};
18514        let mut buf = [0u8; 1024];
18515        rng.fill_bytes(&mut buf);
18516        let mut unstructured = Unstructured::new(&buf);
18517        Self::arbitrary(&mut unstructured).unwrap_or_default()
18518    }
18519}
18520impl Default for LOG_DATA_DATA {
18521    fn default() -> Self {
18522        Self::DEFAULT.clone()
18523    }
18524}
18525impl MessageData for LOG_DATA_DATA {
18526    type Message = MavMessage;
18527    const ID: u32 = 120u32;
18528    const NAME: &'static str = "LOG_DATA";
18529    const EXTRA_CRC: u8 = 134u8;
18530    const ENCODED_LEN: usize = 97usize;
18531    fn deser(
18532        _version: MavlinkVersion,
18533        __input: &[u8],
18534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18535        let avail_len = __input.len();
18536        let mut payload_buf = [0; Self::ENCODED_LEN];
18537        let mut buf = if avail_len < Self::ENCODED_LEN {
18538            payload_buf[0..avail_len].copy_from_slice(__input);
18539            Bytes::new(&payload_buf)
18540        } else {
18541            Bytes::new(__input)
18542        };
18543        let mut __struct = Self::default();
18544        __struct.ofs = buf.get_u32_le()?;
18545        __struct.id = buf.get_u16_le()?;
18546        __struct.count = buf.get_u8()?;
18547        for v in &mut __struct.data {
18548            let val = buf.get_u8()?;
18549            *v = val;
18550        }
18551        Ok(__struct)
18552    }
18553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18554        let mut __tmp = BytesMut::new(bytes);
18555        #[allow(clippy::absurd_extreme_comparisons)]
18556        #[allow(unused_comparisons)]
18557        if __tmp.remaining() < Self::ENCODED_LEN {
18558            panic!(
18559                "buffer is too small (need {} bytes, but got {})",
18560                Self::ENCODED_LEN,
18561                __tmp.remaining(),
18562            )
18563        }
18564        __tmp.put_u32_le(self.ofs);
18565        __tmp.put_u16_le(self.id);
18566        __tmp.put_u8(self.count);
18567        for val in &self.data {
18568            __tmp.put_u8(*val);
18569        }
18570        if matches!(version, MavlinkVersion::V2) {
18571            let len = __tmp.len();
18572            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18573        } else {
18574            __tmp.len()
18575        }
18576    }
18577}
18578#[doc = "Reply to LOG_REQUEST_LIST."]
18579#[doc = ""]
18580#[doc = "ID: 118"]
18581#[derive(Debug, Clone, PartialEq)]
18582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18583#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18584#[cfg_attr(feature = "ts", derive(TS))]
18585#[cfg_attr(feature = "ts", ts(export))]
18586pub struct LOG_ENTRY_DATA {
18587    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18588    pub time_utc: u32,
18589    #[doc = "Size of the log (may be approximate)"]
18590    pub size: u32,
18591    #[doc = "Log id"]
18592    pub id: u16,
18593    #[doc = "Total number of logs"]
18594    pub num_logs: u16,
18595    #[doc = "High log number"]
18596    pub last_log_num: u16,
18597}
18598impl LOG_ENTRY_DATA {
18599    pub const ENCODED_LEN: usize = 14usize;
18600    pub const DEFAULT: Self = Self {
18601        time_utc: 0_u32,
18602        size: 0_u32,
18603        id: 0_u16,
18604        num_logs: 0_u16,
18605        last_log_num: 0_u16,
18606    };
18607    #[cfg(feature = "arbitrary")]
18608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18609        use arbitrary::{Arbitrary, Unstructured};
18610        let mut buf = [0u8; 1024];
18611        rng.fill_bytes(&mut buf);
18612        let mut unstructured = Unstructured::new(&buf);
18613        Self::arbitrary(&mut unstructured).unwrap_or_default()
18614    }
18615}
18616impl Default for LOG_ENTRY_DATA {
18617    fn default() -> Self {
18618        Self::DEFAULT.clone()
18619    }
18620}
18621impl MessageData for LOG_ENTRY_DATA {
18622    type Message = MavMessage;
18623    const ID: u32 = 118u32;
18624    const NAME: &'static str = "LOG_ENTRY";
18625    const EXTRA_CRC: u8 = 56u8;
18626    const ENCODED_LEN: usize = 14usize;
18627    fn deser(
18628        _version: MavlinkVersion,
18629        __input: &[u8],
18630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18631        let avail_len = __input.len();
18632        let mut payload_buf = [0; Self::ENCODED_LEN];
18633        let mut buf = if avail_len < Self::ENCODED_LEN {
18634            payload_buf[0..avail_len].copy_from_slice(__input);
18635            Bytes::new(&payload_buf)
18636        } else {
18637            Bytes::new(__input)
18638        };
18639        let mut __struct = Self::default();
18640        __struct.time_utc = buf.get_u32_le()?;
18641        __struct.size = buf.get_u32_le()?;
18642        __struct.id = buf.get_u16_le()?;
18643        __struct.num_logs = buf.get_u16_le()?;
18644        __struct.last_log_num = buf.get_u16_le()?;
18645        Ok(__struct)
18646    }
18647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18648        let mut __tmp = BytesMut::new(bytes);
18649        #[allow(clippy::absurd_extreme_comparisons)]
18650        #[allow(unused_comparisons)]
18651        if __tmp.remaining() < Self::ENCODED_LEN {
18652            panic!(
18653                "buffer is too small (need {} bytes, but got {})",
18654                Self::ENCODED_LEN,
18655                __tmp.remaining(),
18656            )
18657        }
18658        __tmp.put_u32_le(self.time_utc);
18659        __tmp.put_u32_le(self.size);
18660        __tmp.put_u16_le(self.id);
18661        __tmp.put_u16_le(self.num_logs);
18662        __tmp.put_u16_le(self.last_log_num);
18663        if matches!(version, MavlinkVersion::V2) {
18664            let len = __tmp.len();
18665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18666        } else {
18667            __tmp.len()
18668        }
18669    }
18670}
18671#[doc = "Erase all logs."]
18672#[doc = ""]
18673#[doc = "ID: 121"]
18674#[derive(Debug, Clone, PartialEq)]
18675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18677#[cfg_attr(feature = "ts", derive(TS))]
18678#[cfg_attr(feature = "ts", ts(export))]
18679pub struct LOG_ERASE_DATA {
18680    #[doc = "System ID"]
18681    pub target_system: u8,
18682    #[doc = "Component ID"]
18683    pub target_component: u8,
18684}
18685impl LOG_ERASE_DATA {
18686    pub const ENCODED_LEN: usize = 2usize;
18687    pub const DEFAULT: Self = Self {
18688        target_system: 0_u8,
18689        target_component: 0_u8,
18690    };
18691    #[cfg(feature = "arbitrary")]
18692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18693        use arbitrary::{Arbitrary, Unstructured};
18694        let mut buf = [0u8; 1024];
18695        rng.fill_bytes(&mut buf);
18696        let mut unstructured = Unstructured::new(&buf);
18697        Self::arbitrary(&mut unstructured).unwrap_or_default()
18698    }
18699}
18700impl Default for LOG_ERASE_DATA {
18701    fn default() -> Self {
18702        Self::DEFAULT.clone()
18703    }
18704}
18705impl MessageData for LOG_ERASE_DATA {
18706    type Message = MavMessage;
18707    const ID: u32 = 121u32;
18708    const NAME: &'static str = "LOG_ERASE";
18709    const EXTRA_CRC: u8 = 237u8;
18710    const ENCODED_LEN: usize = 2usize;
18711    fn deser(
18712        _version: MavlinkVersion,
18713        __input: &[u8],
18714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18715        let avail_len = __input.len();
18716        let mut payload_buf = [0; Self::ENCODED_LEN];
18717        let mut buf = if avail_len < Self::ENCODED_LEN {
18718            payload_buf[0..avail_len].copy_from_slice(__input);
18719            Bytes::new(&payload_buf)
18720        } else {
18721            Bytes::new(__input)
18722        };
18723        let mut __struct = Self::default();
18724        __struct.target_system = buf.get_u8()?;
18725        __struct.target_component = buf.get_u8()?;
18726        Ok(__struct)
18727    }
18728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18729        let mut __tmp = BytesMut::new(bytes);
18730        #[allow(clippy::absurd_extreme_comparisons)]
18731        #[allow(unused_comparisons)]
18732        if __tmp.remaining() < Self::ENCODED_LEN {
18733            panic!(
18734                "buffer is too small (need {} bytes, but got {})",
18735                Self::ENCODED_LEN,
18736                __tmp.remaining(),
18737            )
18738        }
18739        __tmp.put_u8(self.target_system);
18740        __tmp.put_u8(self.target_component);
18741        if matches!(version, MavlinkVersion::V2) {
18742            let len = __tmp.len();
18743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18744        } else {
18745            __tmp.len()
18746        }
18747    }
18748}
18749#[doc = "Request a chunk of a log."]
18750#[doc = ""]
18751#[doc = "ID: 119"]
18752#[derive(Debug, Clone, PartialEq)]
18753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18755#[cfg_attr(feature = "ts", derive(TS))]
18756#[cfg_attr(feature = "ts", ts(export))]
18757pub struct LOG_REQUEST_DATA_DATA {
18758    #[doc = "Offset into the log"]
18759    pub ofs: u32,
18760    #[doc = "Number of bytes"]
18761    pub count: u32,
18762    #[doc = "Log id (from LOG_ENTRY reply)"]
18763    pub id: u16,
18764    #[doc = "System ID"]
18765    pub target_system: u8,
18766    #[doc = "Component ID"]
18767    pub target_component: u8,
18768}
18769impl LOG_REQUEST_DATA_DATA {
18770    pub const ENCODED_LEN: usize = 12usize;
18771    pub const DEFAULT: Self = Self {
18772        ofs: 0_u32,
18773        count: 0_u32,
18774        id: 0_u16,
18775        target_system: 0_u8,
18776        target_component: 0_u8,
18777    };
18778    #[cfg(feature = "arbitrary")]
18779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18780        use arbitrary::{Arbitrary, Unstructured};
18781        let mut buf = [0u8; 1024];
18782        rng.fill_bytes(&mut buf);
18783        let mut unstructured = Unstructured::new(&buf);
18784        Self::arbitrary(&mut unstructured).unwrap_or_default()
18785    }
18786}
18787impl Default for LOG_REQUEST_DATA_DATA {
18788    fn default() -> Self {
18789        Self::DEFAULT.clone()
18790    }
18791}
18792impl MessageData for LOG_REQUEST_DATA_DATA {
18793    type Message = MavMessage;
18794    const ID: u32 = 119u32;
18795    const NAME: &'static str = "LOG_REQUEST_DATA";
18796    const EXTRA_CRC: u8 = 116u8;
18797    const ENCODED_LEN: usize = 12usize;
18798    fn deser(
18799        _version: MavlinkVersion,
18800        __input: &[u8],
18801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18802        let avail_len = __input.len();
18803        let mut payload_buf = [0; Self::ENCODED_LEN];
18804        let mut buf = if avail_len < Self::ENCODED_LEN {
18805            payload_buf[0..avail_len].copy_from_slice(__input);
18806            Bytes::new(&payload_buf)
18807        } else {
18808            Bytes::new(__input)
18809        };
18810        let mut __struct = Self::default();
18811        __struct.ofs = buf.get_u32_le()?;
18812        __struct.count = buf.get_u32_le()?;
18813        __struct.id = buf.get_u16_le()?;
18814        __struct.target_system = buf.get_u8()?;
18815        __struct.target_component = buf.get_u8()?;
18816        Ok(__struct)
18817    }
18818    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18819        let mut __tmp = BytesMut::new(bytes);
18820        #[allow(clippy::absurd_extreme_comparisons)]
18821        #[allow(unused_comparisons)]
18822        if __tmp.remaining() < Self::ENCODED_LEN {
18823            panic!(
18824                "buffer is too small (need {} bytes, but got {})",
18825                Self::ENCODED_LEN,
18826                __tmp.remaining(),
18827            )
18828        }
18829        __tmp.put_u32_le(self.ofs);
18830        __tmp.put_u32_le(self.count);
18831        __tmp.put_u16_le(self.id);
18832        __tmp.put_u8(self.target_system);
18833        __tmp.put_u8(self.target_component);
18834        if matches!(version, MavlinkVersion::V2) {
18835            let len = __tmp.len();
18836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18837        } else {
18838            __tmp.len()
18839        }
18840    }
18841}
18842#[doc = "Stop log transfer and resume normal logging."]
18843#[doc = ""]
18844#[doc = "ID: 122"]
18845#[derive(Debug, Clone, PartialEq)]
18846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18848#[cfg_attr(feature = "ts", derive(TS))]
18849#[cfg_attr(feature = "ts", ts(export))]
18850pub struct LOG_REQUEST_END_DATA {
18851    #[doc = "System ID"]
18852    pub target_system: u8,
18853    #[doc = "Component ID"]
18854    pub target_component: u8,
18855}
18856impl LOG_REQUEST_END_DATA {
18857    pub const ENCODED_LEN: usize = 2usize;
18858    pub const DEFAULT: Self = Self {
18859        target_system: 0_u8,
18860        target_component: 0_u8,
18861    };
18862    #[cfg(feature = "arbitrary")]
18863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18864        use arbitrary::{Arbitrary, Unstructured};
18865        let mut buf = [0u8; 1024];
18866        rng.fill_bytes(&mut buf);
18867        let mut unstructured = Unstructured::new(&buf);
18868        Self::arbitrary(&mut unstructured).unwrap_or_default()
18869    }
18870}
18871impl Default for LOG_REQUEST_END_DATA {
18872    fn default() -> Self {
18873        Self::DEFAULT.clone()
18874    }
18875}
18876impl MessageData for LOG_REQUEST_END_DATA {
18877    type Message = MavMessage;
18878    const ID: u32 = 122u32;
18879    const NAME: &'static str = "LOG_REQUEST_END";
18880    const EXTRA_CRC: u8 = 203u8;
18881    const ENCODED_LEN: usize = 2usize;
18882    fn deser(
18883        _version: MavlinkVersion,
18884        __input: &[u8],
18885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18886        let avail_len = __input.len();
18887        let mut payload_buf = [0; Self::ENCODED_LEN];
18888        let mut buf = if avail_len < Self::ENCODED_LEN {
18889            payload_buf[0..avail_len].copy_from_slice(__input);
18890            Bytes::new(&payload_buf)
18891        } else {
18892            Bytes::new(__input)
18893        };
18894        let mut __struct = Self::default();
18895        __struct.target_system = buf.get_u8()?;
18896        __struct.target_component = buf.get_u8()?;
18897        Ok(__struct)
18898    }
18899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18900        let mut __tmp = BytesMut::new(bytes);
18901        #[allow(clippy::absurd_extreme_comparisons)]
18902        #[allow(unused_comparisons)]
18903        if __tmp.remaining() < Self::ENCODED_LEN {
18904            panic!(
18905                "buffer is too small (need {} bytes, but got {})",
18906                Self::ENCODED_LEN,
18907                __tmp.remaining(),
18908            )
18909        }
18910        __tmp.put_u8(self.target_system);
18911        __tmp.put_u8(self.target_component);
18912        if matches!(version, MavlinkVersion::V2) {
18913            let len = __tmp.len();
18914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18915        } else {
18916            __tmp.len()
18917        }
18918    }
18919}
18920#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18921#[doc = ""]
18922#[doc = "ID: 117"]
18923#[derive(Debug, Clone, PartialEq)]
18924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18926#[cfg_attr(feature = "ts", derive(TS))]
18927#[cfg_attr(feature = "ts", ts(export))]
18928pub struct LOG_REQUEST_LIST_DATA {
18929    #[doc = "First log id (0 for first available)"]
18930    pub start: u16,
18931    #[doc = "Last log id (0xffff for last available)"]
18932    pub end: u16,
18933    #[doc = "System ID"]
18934    pub target_system: u8,
18935    #[doc = "Component ID"]
18936    pub target_component: u8,
18937}
18938impl LOG_REQUEST_LIST_DATA {
18939    pub const ENCODED_LEN: usize = 6usize;
18940    pub const DEFAULT: Self = Self {
18941        start: 0_u16,
18942        end: 0_u16,
18943        target_system: 0_u8,
18944        target_component: 0_u8,
18945    };
18946    #[cfg(feature = "arbitrary")]
18947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18948        use arbitrary::{Arbitrary, Unstructured};
18949        let mut buf = [0u8; 1024];
18950        rng.fill_bytes(&mut buf);
18951        let mut unstructured = Unstructured::new(&buf);
18952        Self::arbitrary(&mut unstructured).unwrap_or_default()
18953    }
18954}
18955impl Default for LOG_REQUEST_LIST_DATA {
18956    fn default() -> Self {
18957        Self::DEFAULT.clone()
18958    }
18959}
18960impl MessageData for LOG_REQUEST_LIST_DATA {
18961    type Message = MavMessage;
18962    const ID: u32 = 117u32;
18963    const NAME: &'static str = "LOG_REQUEST_LIST";
18964    const EXTRA_CRC: u8 = 128u8;
18965    const ENCODED_LEN: usize = 6usize;
18966    fn deser(
18967        _version: MavlinkVersion,
18968        __input: &[u8],
18969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18970        let avail_len = __input.len();
18971        let mut payload_buf = [0; Self::ENCODED_LEN];
18972        let mut buf = if avail_len < Self::ENCODED_LEN {
18973            payload_buf[0..avail_len].copy_from_slice(__input);
18974            Bytes::new(&payload_buf)
18975        } else {
18976            Bytes::new(__input)
18977        };
18978        let mut __struct = Self::default();
18979        __struct.start = buf.get_u16_le()?;
18980        __struct.end = buf.get_u16_le()?;
18981        __struct.target_system = buf.get_u8()?;
18982        __struct.target_component = buf.get_u8()?;
18983        Ok(__struct)
18984    }
18985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18986        let mut __tmp = BytesMut::new(bytes);
18987        #[allow(clippy::absurd_extreme_comparisons)]
18988        #[allow(unused_comparisons)]
18989        if __tmp.remaining() < Self::ENCODED_LEN {
18990            panic!(
18991                "buffer is too small (need {} bytes, but got {})",
18992                Self::ENCODED_LEN,
18993                __tmp.remaining(),
18994            )
18995        }
18996        __tmp.put_u16_le(self.start);
18997        __tmp.put_u16_le(self.end);
18998        __tmp.put_u8(self.target_system);
18999        __tmp.put_u8(self.target_component);
19000        if matches!(version, MavlinkVersion::V2) {
19001            let len = __tmp.len();
19002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19003        } else {
19004            __tmp.len()
19005        }
19006    }
19007}
19008#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19009#[doc = ""]
19010#[doc = "ID: 192"]
19011#[derive(Debug, Clone, PartialEq)]
19012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19014#[cfg_attr(feature = "ts", derive(TS))]
19015#[cfg_attr(feature = "ts", ts(export))]
19016pub struct MAG_CAL_REPORT_DATA {
19017    #[doc = "RMS milligauss residuals."]
19018    pub fitness: f32,
19019    #[doc = "X offset."]
19020    pub ofs_x: f32,
19021    #[doc = "Y offset."]
19022    pub ofs_y: f32,
19023    #[doc = "Z offset."]
19024    pub ofs_z: f32,
19025    #[doc = "X diagonal (matrix 11)."]
19026    pub diag_x: f32,
19027    #[doc = "Y diagonal (matrix 22)."]
19028    pub diag_y: f32,
19029    #[doc = "Z diagonal (matrix 33)."]
19030    pub diag_z: f32,
19031    #[doc = "X off-diagonal (matrix 12 and 21)."]
19032    pub offdiag_x: f32,
19033    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19034    pub offdiag_y: f32,
19035    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19036    pub offdiag_z: f32,
19037    #[doc = "Compass being calibrated."]
19038    pub compass_id: u8,
19039    #[doc = "Bitmask of compasses being calibrated."]
19040    pub cal_mask: u8,
19041    #[doc = "Calibration Status."]
19042    pub cal_status: MagCalStatus,
19043    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19044    pub autosaved: u8,
19045    #[doc = "Confidence in orientation (higher is better)."]
19046    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19047    pub orientation_confidence: f32,
19048    #[doc = "orientation before calibration."]
19049    #[cfg_attr(feature = "serde", serde(default))]
19050    pub old_orientation: MavSensorOrientation,
19051    #[doc = "orientation after calibration."]
19052    #[cfg_attr(feature = "serde", serde(default))]
19053    pub new_orientation: MavSensorOrientation,
19054    #[doc = "field radius correction factor"]
19055    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19056    pub scale_factor: f32,
19057}
19058impl MAG_CAL_REPORT_DATA {
19059    pub const ENCODED_LEN: usize = 54usize;
19060    pub const DEFAULT: Self = Self {
19061        fitness: 0.0_f32,
19062        ofs_x: 0.0_f32,
19063        ofs_y: 0.0_f32,
19064        ofs_z: 0.0_f32,
19065        diag_x: 0.0_f32,
19066        diag_y: 0.0_f32,
19067        diag_z: 0.0_f32,
19068        offdiag_x: 0.0_f32,
19069        offdiag_y: 0.0_f32,
19070        offdiag_z: 0.0_f32,
19071        compass_id: 0_u8,
19072        cal_mask: 0_u8,
19073        cal_status: MagCalStatus::DEFAULT,
19074        autosaved: 0_u8,
19075        orientation_confidence: 0.0_f32,
19076        old_orientation: MavSensorOrientation::DEFAULT,
19077        new_orientation: MavSensorOrientation::DEFAULT,
19078        scale_factor: 0.0_f32,
19079    };
19080    #[cfg(feature = "arbitrary")]
19081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19082        use arbitrary::{Arbitrary, Unstructured};
19083        let mut buf = [0u8; 1024];
19084        rng.fill_bytes(&mut buf);
19085        let mut unstructured = Unstructured::new(&buf);
19086        Self::arbitrary(&mut unstructured).unwrap_or_default()
19087    }
19088}
19089impl Default for MAG_CAL_REPORT_DATA {
19090    fn default() -> Self {
19091        Self::DEFAULT.clone()
19092    }
19093}
19094impl MessageData for MAG_CAL_REPORT_DATA {
19095    type Message = MavMessage;
19096    const ID: u32 = 192u32;
19097    const NAME: &'static str = "MAG_CAL_REPORT";
19098    const EXTRA_CRC: u8 = 36u8;
19099    const ENCODED_LEN: usize = 54usize;
19100    fn deser(
19101        _version: MavlinkVersion,
19102        __input: &[u8],
19103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19104        let avail_len = __input.len();
19105        let mut payload_buf = [0; Self::ENCODED_LEN];
19106        let mut buf = if avail_len < Self::ENCODED_LEN {
19107            payload_buf[0..avail_len].copy_from_slice(__input);
19108            Bytes::new(&payload_buf)
19109        } else {
19110            Bytes::new(__input)
19111        };
19112        let mut __struct = Self::default();
19113        __struct.fitness = buf.get_f32_le()?;
19114        __struct.ofs_x = buf.get_f32_le()?;
19115        __struct.ofs_y = buf.get_f32_le()?;
19116        __struct.ofs_z = buf.get_f32_le()?;
19117        __struct.diag_x = buf.get_f32_le()?;
19118        __struct.diag_y = buf.get_f32_le()?;
19119        __struct.diag_z = buf.get_f32_le()?;
19120        __struct.offdiag_x = buf.get_f32_le()?;
19121        __struct.offdiag_y = buf.get_f32_le()?;
19122        __struct.offdiag_z = buf.get_f32_le()?;
19123        __struct.compass_id = buf.get_u8()?;
19124        __struct.cal_mask = buf.get_u8()?;
19125        let tmp = buf.get_u8()?;
19126        __struct.cal_status =
19127            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19128                enum_type: "MagCalStatus",
19129                value: tmp as u64,
19130            })?;
19131        __struct.autosaved = buf.get_u8()?;
19132        __struct.orientation_confidence = buf.get_f32_le()?;
19133        let tmp = buf.get_u8()?;
19134        __struct.old_orientation =
19135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19136                enum_type: "MavSensorOrientation",
19137                value: tmp as u64,
19138            })?;
19139        let tmp = buf.get_u8()?;
19140        __struct.new_orientation =
19141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19142                enum_type: "MavSensorOrientation",
19143                value: tmp as u64,
19144            })?;
19145        __struct.scale_factor = buf.get_f32_le()?;
19146        Ok(__struct)
19147    }
19148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19149        let mut __tmp = BytesMut::new(bytes);
19150        #[allow(clippy::absurd_extreme_comparisons)]
19151        #[allow(unused_comparisons)]
19152        if __tmp.remaining() < Self::ENCODED_LEN {
19153            panic!(
19154                "buffer is too small (need {} bytes, but got {})",
19155                Self::ENCODED_LEN,
19156                __tmp.remaining(),
19157            )
19158        }
19159        __tmp.put_f32_le(self.fitness);
19160        __tmp.put_f32_le(self.ofs_x);
19161        __tmp.put_f32_le(self.ofs_y);
19162        __tmp.put_f32_le(self.ofs_z);
19163        __tmp.put_f32_le(self.diag_x);
19164        __tmp.put_f32_le(self.diag_y);
19165        __tmp.put_f32_le(self.diag_z);
19166        __tmp.put_f32_le(self.offdiag_x);
19167        __tmp.put_f32_le(self.offdiag_y);
19168        __tmp.put_f32_le(self.offdiag_z);
19169        __tmp.put_u8(self.compass_id);
19170        __tmp.put_u8(self.cal_mask);
19171        __tmp.put_u8(self.cal_status as u8);
19172        __tmp.put_u8(self.autosaved);
19173        if matches!(version, MavlinkVersion::V2) {
19174            __tmp.put_f32_le(self.orientation_confidence);
19175            __tmp.put_u8(self.old_orientation as u8);
19176            __tmp.put_u8(self.new_orientation as u8);
19177            __tmp.put_f32_le(self.scale_factor);
19178            let len = __tmp.len();
19179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19180        } else {
19181            __tmp.len()
19182        }
19183    }
19184}
19185#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19186#[doc = ""]
19187#[doc = "ID: 69"]
19188#[derive(Debug, Clone, PartialEq)]
19189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19191#[cfg_attr(feature = "ts", derive(TS))]
19192#[cfg_attr(feature = "ts", ts(export))]
19193pub struct MANUAL_CONTROL_DATA {
19194    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19195    pub x: i16,
19196    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19197    pub y: i16,
19198    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19199    pub z: i16,
19200    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19201    pub r: i16,
19202    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19203    pub buttons: u16,
19204    #[doc = "The system to be controlled."]
19205    pub target: u8,
19206    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19207    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19208    pub buttons2: u16,
19209    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19210    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19211    pub enabled_extensions: u8,
19212    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19213    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19214    pub s: i16,
19215    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19217    pub t: i16,
19218    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19220    pub aux1: i16,
19221    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19222    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19223    pub aux2: i16,
19224    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19225    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19226    pub aux3: i16,
19227    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19228    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19229    pub aux4: i16,
19230    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19231    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19232    pub aux5: i16,
19233    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19234    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19235    pub aux6: i16,
19236}
19237impl MANUAL_CONTROL_DATA {
19238    pub const ENCODED_LEN: usize = 30usize;
19239    pub const DEFAULT: Self = Self {
19240        x: 0_i16,
19241        y: 0_i16,
19242        z: 0_i16,
19243        r: 0_i16,
19244        buttons: 0_u16,
19245        target: 0_u8,
19246        buttons2: 0_u16,
19247        enabled_extensions: 0_u8,
19248        s: 0_i16,
19249        t: 0_i16,
19250        aux1: 0_i16,
19251        aux2: 0_i16,
19252        aux3: 0_i16,
19253        aux4: 0_i16,
19254        aux5: 0_i16,
19255        aux6: 0_i16,
19256    };
19257    #[cfg(feature = "arbitrary")]
19258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19259        use arbitrary::{Arbitrary, Unstructured};
19260        let mut buf = [0u8; 1024];
19261        rng.fill_bytes(&mut buf);
19262        let mut unstructured = Unstructured::new(&buf);
19263        Self::arbitrary(&mut unstructured).unwrap_or_default()
19264    }
19265}
19266impl Default for MANUAL_CONTROL_DATA {
19267    fn default() -> Self {
19268        Self::DEFAULT.clone()
19269    }
19270}
19271impl MessageData for MANUAL_CONTROL_DATA {
19272    type Message = MavMessage;
19273    const ID: u32 = 69u32;
19274    const NAME: &'static str = "MANUAL_CONTROL";
19275    const EXTRA_CRC: u8 = 243u8;
19276    const ENCODED_LEN: usize = 30usize;
19277    fn deser(
19278        _version: MavlinkVersion,
19279        __input: &[u8],
19280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19281        let avail_len = __input.len();
19282        let mut payload_buf = [0; Self::ENCODED_LEN];
19283        let mut buf = if avail_len < Self::ENCODED_LEN {
19284            payload_buf[0..avail_len].copy_from_slice(__input);
19285            Bytes::new(&payload_buf)
19286        } else {
19287            Bytes::new(__input)
19288        };
19289        let mut __struct = Self::default();
19290        __struct.x = buf.get_i16_le()?;
19291        __struct.y = buf.get_i16_le()?;
19292        __struct.z = buf.get_i16_le()?;
19293        __struct.r = buf.get_i16_le()?;
19294        __struct.buttons = buf.get_u16_le()?;
19295        __struct.target = buf.get_u8()?;
19296        __struct.buttons2 = buf.get_u16_le()?;
19297        __struct.enabled_extensions = buf.get_u8()?;
19298        __struct.s = buf.get_i16_le()?;
19299        __struct.t = buf.get_i16_le()?;
19300        __struct.aux1 = buf.get_i16_le()?;
19301        __struct.aux2 = buf.get_i16_le()?;
19302        __struct.aux3 = buf.get_i16_le()?;
19303        __struct.aux4 = buf.get_i16_le()?;
19304        __struct.aux5 = buf.get_i16_le()?;
19305        __struct.aux6 = buf.get_i16_le()?;
19306        Ok(__struct)
19307    }
19308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19309        let mut __tmp = BytesMut::new(bytes);
19310        #[allow(clippy::absurd_extreme_comparisons)]
19311        #[allow(unused_comparisons)]
19312        if __tmp.remaining() < Self::ENCODED_LEN {
19313            panic!(
19314                "buffer is too small (need {} bytes, but got {})",
19315                Self::ENCODED_LEN,
19316                __tmp.remaining(),
19317            )
19318        }
19319        __tmp.put_i16_le(self.x);
19320        __tmp.put_i16_le(self.y);
19321        __tmp.put_i16_le(self.z);
19322        __tmp.put_i16_le(self.r);
19323        __tmp.put_u16_le(self.buttons);
19324        __tmp.put_u8(self.target);
19325        if matches!(version, MavlinkVersion::V2) {
19326            __tmp.put_u16_le(self.buttons2);
19327            __tmp.put_u8(self.enabled_extensions);
19328            __tmp.put_i16_le(self.s);
19329            __tmp.put_i16_le(self.t);
19330            __tmp.put_i16_le(self.aux1);
19331            __tmp.put_i16_le(self.aux2);
19332            __tmp.put_i16_le(self.aux3);
19333            __tmp.put_i16_le(self.aux4);
19334            __tmp.put_i16_le(self.aux5);
19335            __tmp.put_i16_le(self.aux6);
19336            let len = __tmp.len();
19337            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19338        } else {
19339            __tmp.len()
19340        }
19341    }
19342}
19343#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19344#[doc = ""]
19345#[doc = "ID: 81"]
19346#[derive(Debug, Clone, PartialEq)]
19347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19349#[cfg_attr(feature = "ts", derive(TS))]
19350#[cfg_attr(feature = "ts", ts(export))]
19351pub struct MANUAL_SETPOINT_DATA {
19352    #[doc = "Timestamp (time since system boot)."]
19353    pub time_boot_ms: u32,
19354    #[doc = "Desired roll rate"]
19355    pub roll: f32,
19356    #[doc = "Desired pitch rate"]
19357    pub pitch: f32,
19358    #[doc = "Desired yaw rate"]
19359    pub yaw: f32,
19360    #[doc = "Collective thrust, normalized to 0 .. 1"]
19361    pub thrust: f32,
19362    #[doc = "Flight mode switch position, 0.. 255"]
19363    pub mode_switch: u8,
19364    #[doc = "Override mode switch position, 0.. 255"]
19365    pub manual_override_switch: u8,
19366}
19367impl MANUAL_SETPOINT_DATA {
19368    pub const ENCODED_LEN: usize = 22usize;
19369    pub const DEFAULT: Self = Self {
19370        time_boot_ms: 0_u32,
19371        roll: 0.0_f32,
19372        pitch: 0.0_f32,
19373        yaw: 0.0_f32,
19374        thrust: 0.0_f32,
19375        mode_switch: 0_u8,
19376        manual_override_switch: 0_u8,
19377    };
19378    #[cfg(feature = "arbitrary")]
19379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19380        use arbitrary::{Arbitrary, Unstructured};
19381        let mut buf = [0u8; 1024];
19382        rng.fill_bytes(&mut buf);
19383        let mut unstructured = Unstructured::new(&buf);
19384        Self::arbitrary(&mut unstructured).unwrap_or_default()
19385    }
19386}
19387impl Default for MANUAL_SETPOINT_DATA {
19388    fn default() -> Self {
19389        Self::DEFAULT.clone()
19390    }
19391}
19392impl MessageData for MANUAL_SETPOINT_DATA {
19393    type Message = MavMessage;
19394    const ID: u32 = 81u32;
19395    const NAME: &'static str = "MANUAL_SETPOINT";
19396    const EXTRA_CRC: u8 = 106u8;
19397    const ENCODED_LEN: usize = 22usize;
19398    fn deser(
19399        _version: MavlinkVersion,
19400        __input: &[u8],
19401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19402        let avail_len = __input.len();
19403        let mut payload_buf = [0; Self::ENCODED_LEN];
19404        let mut buf = if avail_len < Self::ENCODED_LEN {
19405            payload_buf[0..avail_len].copy_from_slice(__input);
19406            Bytes::new(&payload_buf)
19407        } else {
19408            Bytes::new(__input)
19409        };
19410        let mut __struct = Self::default();
19411        __struct.time_boot_ms = buf.get_u32_le()?;
19412        __struct.roll = buf.get_f32_le()?;
19413        __struct.pitch = buf.get_f32_le()?;
19414        __struct.yaw = buf.get_f32_le()?;
19415        __struct.thrust = buf.get_f32_le()?;
19416        __struct.mode_switch = buf.get_u8()?;
19417        __struct.manual_override_switch = buf.get_u8()?;
19418        Ok(__struct)
19419    }
19420    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19421        let mut __tmp = BytesMut::new(bytes);
19422        #[allow(clippy::absurd_extreme_comparisons)]
19423        #[allow(unused_comparisons)]
19424        if __tmp.remaining() < Self::ENCODED_LEN {
19425            panic!(
19426                "buffer is too small (need {} bytes, but got {})",
19427                Self::ENCODED_LEN,
19428                __tmp.remaining(),
19429            )
19430        }
19431        __tmp.put_u32_le(self.time_boot_ms);
19432        __tmp.put_f32_le(self.roll);
19433        __tmp.put_f32_le(self.pitch);
19434        __tmp.put_f32_le(self.yaw);
19435        __tmp.put_f32_le(self.thrust);
19436        __tmp.put_u8(self.mode_switch);
19437        __tmp.put_u8(self.manual_override_switch);
19438        if matches!(version, MavlinkVersion::V2) {
19439            let len = __tmp.len();
19440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19441        } else {
19442            __tmp.len()
19443        }
19444    }
19445}
19446#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19447#[doc = ""]
19448#[doc = "ID: 249"]
19449#[derive(Debug, Clone, PartialEq)]
19450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19452#[cfg_attr(feature = "ts", derive(TS))]
19453#[cfg_attr(feature = "ts", ts(export))]
19454pub struct MEMORY_VECT_DATA {
19455    #[doc = "Starting address of the debug variables"]
19456    pub address: u16,
19457    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19458    pub ver: u8,
19459    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19460    pub mavtype: u8,
19461    #[doc = "Memory contents at specified address"]
19462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19463    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19464    pub value: [i8; 32],
19465}
19466impl MEMORY_VECT_DATA {
19467    pub const ENCODED_LEN: usize = 36usize;
19468    pub const DEFAULT: Self = Self {
19469        address: 0_u16,
19470        ver: 0_u8,
19471        mavtype: 0_u8,
19472        value: [0_i8; 32usize],
19473    };
19474    #[cfg(feature = "arbitrary")]
19475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19476        use arbitrary::{Arbitrary, Unstructured};
19477        let mut buf = [0u8; 1024];
19478        rng.fill_bytes(&mut buf);
19479        let mut unstructured = Unstructured::new(&buf);
19480        Self::arbitrary(&mut unstructured).unwrap_or_default()
19481    }
19482}
19483impl Default for MEMORY_VECT_DATA {
19484    fn default() -> Self {
19485        Self::DEFAULT.clone()
19486    }
19487}
19488impl MessageData for MEMORY_VECT_DATA {
19489    type Message = MavMessage;
19490    const ID: u32 = 249u32;
19491    const NAME: &'static str = "MEMORY_VECT";
19492    const EXTRA_CRC: u8 = 204u8;
19493    const ENCODED_LEN: usize = 36usize;
19494    fn deser(
19495        _version: MavlinkVersion,
19496        __input: &[u8],
19497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19498        let avail_len = __input.len();
19499        let mut payload_buf = [0; Self::ENCODED_LEN];
19500        let mut buf = if avail_len < Self::ENCODED_LEN {
19501            payload_buf[0..avail_len].copy_from_slice(__input);
19502            Bytes::new(&payload_buf)
19503        } else {
19504            Bytes::new(__input)
19505        };
19506        let mut __struct = Self::default();
19507        __struct.address = buf.get_u16_le()?;
19508        __struct.ver = buf.get_u8()?;
19509        __struct.mavtype = buf.get_u8()?;
19510        for v in &mut __struct.value {
19511            let val = buf.get_i8()?;
19512            *v = val;
19513        }
19514        Ok(__struct)
19515    }
19516    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19517        let mut __tmp = BytesMut::new(bytes);
19518        #[allow(clippy::absurd_extreme_comparisons)]
19519        #[allow(unused_comparisons)]
19520        if __tmp.remaining() < Self::ENCODED_LEN {
19521            panic!(
19522                "buffer is too small (need {} bytes, but got {})",
19523                Self::ENCODED_LEN,
19524                __tmp.remaining(),
19525            )
19526        }
19527        __tmp.put_u16_le(self.address);
19528        __tmp.put_u8(self.ver);
19529        __tmp.put_u8(self.mavtype);
19530        for val in &self.value {
19531            __tmp.put_i8(*val);
19532        }
19533        if matches!(version, MavlinkVersion::V2) {
19534            let len = __tmp.len();
19535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19536        } else {
19537            __tmp.len()
19538        }
19539    }
19540}
19541#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19542#[doc = ""]
19543#[doc = "ID: 244"]
19544#[derive(Debug, Clone, PartialEq)]
19545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19547#[cfg_attr(feature = "ts", derive(TS))]
19548#[cfg_attr(feature = "ts", ts(export))]
19549pub struct MESSAGE_INTERVAL_DATA {
19550    #[doc = "0 indicates the interval at which it is sent."]
19551    pub interval_us: i32,
19552    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19553    pub message_id: u16,
19554}
19555impl MESSAGE_INTERVAL_DATA {
19556    pub const ENCODED_LEN: usize = 6usize;
19557    pub const DEFAULT: Self = Self {
19558        interval_us: 0_i32,
19559        message_id: 0_u16,
19560    };
19561    #[cfg(feature = "arbitrary")]
19562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19563        use arbitrary::{Arbitrary, Unstructured};
19564        let mut buf = [0u8; 1024];
19565        rng.fill_bytes(&mut buf);
19566        let mut unstructured = Unstructured::new(&buf);
19567        Self::arbitrary(&mut unstructured).unwrap_or_default()
19568    }
19569}
19570impl Default for MESSAGE_INTERVAL_DATA {
19571    fn default() -> Self {
19572        Self::DEFAULT.clone()
19573    }
19574}
19575impl MessageData for MESSAGE_INTERVAL_DATA {
19576    type Message = MavMessage;
19577    const ID: u32 = 244u32;
19578    const NAME: &'static str = "MESSAGE_INTERVAL";
19579    const EXTRA_CRC: u8 = 95u8;
19580    const ENCODED_LEN: usize = 6usize;
19581    fn deser(
19582        _version: MavlinkVersion,
19583        __input: &[u8],
19584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19585        let avail_len = __input.len();
19586        let mut payload_buf = [0; Self::ENCODED_LEN];
19587        let mut buf = if avail_len < Self::ENCODED_LEN {
19588            payload_buf[0..avail_len].copy_from_slice(__input);
19589            Bytes::new(&payload_buf)
19590        } else {
19591            Bytes::new(__input)
19592        };
19593        let mut __struct = Self::default();
19594        __struct.interval_us = buf.get_i32_le()?;
19595        __struct.message_id = buf.get_u16_le()?;
19596        Ok(__struct)
19597    }
19598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19599        let mut __tmp = BytesMut::new(bytes);
19600        #[allow(clippy::absurd_extreme_comparisons)]
19601        #[allow(unused_comparisons)]
19602        if __tmp.remaining() < Self::ENCODED_LEN {
19603            panic!(
19604                "buffer is too small (need {} bytes, but got {})",
19605                Self::ENCODED_LEN,
19606                __tmp.remaining(),
19607            )
19608        }
19609        __tmp.put_i32_le(self.interval_us);
19610        __tmp.put_u16_le(self.message_id);
19611        if matches!(version, MavlinkVersion::V2) {
19612            let len = __tmp.len();
19613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19614        } else {
19615            __tmp.len()
19616        }
19617    }
19618}
19619#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19620#[doc = ""]
19621#[doc = "ID: 47"]
19622#[derive(Debug, Clone, PartialEq)]
19623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19625#[cfg_attr(feature = "ts", derive(TS))]
19626#[cfg_attr(feature = "ts", ts(export))]
19627pub struct MISSION_ACK_DATA {
19628    #[doc = "System ID"]
19629    pub target_system: u8,
19630    #[doc = "Component ID"]
19631    pub target_component: u8,
19632    #[doc = "Mission result."]
19633    pub mavtype: MavMissionResult,
19634    #[doc = "Mission type."]
19635    #[cfg_attr(feature = "serde", serde(default))]
19636    pub mission_type: MavMissionType,
19637    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19639    pub opaque_id: u32,
19640}
19641impl MISSION_ACK_DATA {
19642    pub const ENCODED_LEN: usize = 8usize;
19643    pub const DEFAULT: Self = Self {
19644        target_system: 0_u8,
19645        target_component: 0_u8,
19646        mavtype: MavMissionResult::DEFAULT,
19647        mission_type: MavMissionType::DEFAULT,
19648        opaque_id: 0_u32,
19649    };
19650    #[cfg(feature = "arbitrary")]
19651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19652        use arbitrary::{Arbitrary, Unstructured};
19653        let mut buf = [0u8; 1024];
19654        rng.fill_bytes(&mut buf);
19655        let mut unstructured = Unstructured::new(&buf);
19656        Self::arbitrary(&mut unstructured).unwrap_or_default()
19657    }
19658}
19659impl Default for MISSION_ACK_DATA {
19660    fn default() -> Self {
19661        Self::DEFAULT.clone()
19662    }
19663}
19664impl MessageData for MISSION_ACK_DATA {
19665    type Message = MavMessage;
19666    const ID: u32 = 47u32;
19667    const NAME: &'static str = "MISSION_ACK";
19668    const EXTRA_CRC: u8 = 153u8;
19669    const ENCODED_LEN: usize = 8usize;
19670    fn deser(
19671        _version: MavlinkVersion,
19672        __input: &[u8],
19673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19674        let avail_len = __input.len();
19675        let mut payload_buf = [0; Self::ENCODED_LEN];
19676        let mut buf = if avail_len < Self::ENCODED_LEN {
19677            payload_buf[0..avail_len].copy_from_slice(__input);
19678            Bytes::new(&payload_buf)
19679        } else {
19680            Bytes::new(__input)
19681        };
19682        let mut __struct = Self::default();
19683        __struct.target_system = buf.get_u8()?;
19684        __struct.target_component = buf.get_u8()?;
19685        let tmp = buf.get_u8()?;
19686        __struct.mavtype =
19687            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19688                enum_type: "MavMissionResult",
19689                value: tmp as u64,
19690            })?;
19691        let tmp = buf.get_u8()?;
19692        __struct.mission_type =
19693            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19694                enum_type: "MavMissionType",
19695                value: tmp as u64,
19696            })?;
19697        __struct.opaque_id = buf.get_u32_le()?;
19698        Ok(__struct)
19699    }
19700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19701        let mut __tmp = BytesMut::new(bytes);
19702        #[allow(clippy::absurd_extreme_comparisons)]
19703        #[allow(unused_comparisons)]
19704        if __tmp.remaining() < Self::ENCODED_LEN {
19705            panic!(
19706                "buffer is too small (need {} bytes, but got {})",
19707                Self::ENCODED_LEN,
19708                __tmp.remaining(),
19709            )
19710        }
19711        __tmp.put_u8(self.target_system);
19712        __tmp.put_u8(self.target_component);
19713        __tmp.put_u8(self.mavtype as u8);
19714        if matches!(version, MavlinkVersion::V2) {
19715            __tmp.put_u8(self.mission_type as u8);
19716            __tmp.put_u32_le(self.opaque_id);
19717            let len = __tmp.len();
19718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19719        } else {
19720            __tmp.len()
19721        }
19722    }
19723}
19724#[doc = "Delete all mission items at once."]
19725#[doc = ""]
19726#[doc = "ID: 45"]
19727#[derive(Debug, Clone, PartialEq)]
19728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19730#[cfg_attr(feature = "ts", derive(TS))]
19731#[cfg_attr(feature = "ts", ts(export))]
19732pub struct MISSION_CLEAR_ALL_DATA {
19733    #[doc = "System ID"]
19734    pub target_system: u8,
19735    #[doc = "Component ID"]
19736    pub target_component: u8,
19737    #[doc = "Mission type."]
19738    #[cfg_attr(feature = "serde", serde(default))]
19739    pub mission_type: MavMissionType,
19740}
19741impl MISSION_CLEAR_ALL_DATA {
19742    pub const ENCODED_LEN: usize = 3usize;
19743    pub const DEFAULT: Self = Self {
19744        target_system: 0_u8,
19745        target_component: 0_u8,
19746        mission_type: MavMissionType::DEFAULT,
19747    };
19748    #[cfg(feature = "arbitrary")]
19749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19750        use arbitrary::{Arbitrary, Unstructured};
19751        let mut buf = [0u8; 1024];
19752        rng.fill_bytes(&mut buf);
19753        let mut unstructured = Unstructured::new(&buf);
19754        Self::arbitrary(&mut unstructured).unwrap_or_default()
19755    }
19756}
19757impl Default for MISSION_CLEAR_ALL_DATA {
19758    fn default() -> Self {
19759        Self::DEFAULT.clone()
19760    }
19761}
19762impl MessageData for MISSION_CLEAR_ALL_DATA {
19763    type Message = MavMessage;
19764    const ID: u32 = 45u32;
19765    const NAME: &'static str = "MISSION_CLEAR_ALL";
19766    const EXTRA_CRC: u8 = 232u8;
19767    const ENCODED_LEN: usize = 3usize;
19768    fn deser(
19769        _version: MavlinkVersion,
19770        __input: &[u8],
19771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19772        let avail_len = __input.len();
19773        let mut payload_buf = [0; Self::ENCODED_LEN];
19774        let mut buf = if avail_len < Self::ENCODED_LEN {
19775            payload_buf[0..avail_len].copy_from_slice(__input);
19776            Bytes::new(&payload_buf)
19777        } else {
19778            Bytes::new(__input)
19779        };
19780        let mut __struct = Self::default();
19781        __struct.target_system = buf.get_u8()?;
19782        __struct.target_component = buf.get_u8()?;
19783        let tmp = buf.get_u8()?;
19784        __struct.mission_type =
19785            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19786                enum_type: "MavMissionType",
19787                value: tmp as u64,
19788            })?;
19789        Ok(__struct)
19790    }
19791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19792        let mut __tmp = BytesMut::new(bytes);
19793        #[allow(clippy::absurd_extreme_comparisons)]
19794        #[allow(unused_comparisons)]
19795        if __tmp.remaining() < Self::ENCODED_LEN {
19796            panic!(
19797                "buffer is too small (need {} bytes, but got {})",
19798                Self::ENCODED_LEN,
19799                __tmp.remaining(),
19800            )
19801        }
19802        __tmp.put_u8(self.target_system);
19803        __tmp.put_u8(self.target_component);
19804        if matches!(version, MavlinkVersion::V2) {
19805            __tmp.put_u8(self.mission_type as u8);
19806            let len = __tmp.len();
19807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19808        } else {
19809            __tmp.len()
19810        }
19811    }
19812}
19813#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19814#[doc = ""]
19815#[doc = "ID: 44"]
19816#[derive(Debug, Clone, PartialEq)]
19817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19819#[cfg_attr(feature = "ts", derive(TS))]
19820#[cfg_attr(feature = "ts", ts(export))]
19821pub struct MISSION_COUNT_DATA {
19822    #[doc = "Number of mission items in the sequence"]
19823    pub count: u16,
19824    #[doc = "System ID"]
19825    pub target_system: u8,
19826    #[doc = "Component ID"]
19827    pub target_component: u8,
19828    #[doc = "Mission type."]
19829    #[cfg_attr(feature = "serde", serde(default))]
19830    pub mission_type: MavMissionType,
19831    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19833    pub opaque_id: u32,
19834}
19835impl MISSION_COUNT_DATA {
19836    pub const ENCODED_LEN: usize = 9usize;
19837    pub const DEFAULT: Self = Self {
19838        count: 0_u16,
19839        target_system: 0_u8,
19840        target_component: 0_u8,
19841        mission_type: MavMissionType::DEFAULT,
19842        opaque_id: 0_u32,
19843    };
19844    #[cfg(feature = "arbitrary")]
19845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19846        use arbitrary::{Arbitrary, Unstructured};
19847        let mut buf = [0u8; 1024];
19848        rng.fill_bytes(&mut buf);
19849        let mut unstructured = Unstructured::new(&buf);
19850        Self::arbitrary(&mut unstructured).unwrap_or_default()
19851    }
19852}
19853impl Default for MISSION_COUNT_DATA {
19854    fn default() -> Self {
19855        Self::DEFAULT.clone()
19856    }
19857}
19858impl MessageData for MISSION_COUNT_DATA {
19859    type Message = MavMessage;
19860    const ID: u32 = 44u32;
19861    const NAME: &'static str = "MISSION_COUNT";
19862    const EXTRA_CRC: u8 = 221u8;
19863    const ENCODED_LEN: usize = 9usize;
19864    fn deser(
19865        _version: MavlinkVersion,
19866        __input: &[u8],
19867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19868        let avail_len = __input.len();
19869        let mut payload_buf = [0; Self::ENCODED_LEN];
19870        let mut buf = if avail_len < Self::ENCODED_LEN {
19871            payload_buf[0..avail_len].copy_from_slice(__input);
19872            Bytes::new(&payload_buf)
19873        } else {
19874            Bytes::new(__input)
19875        };
19876        let mut __struct = Self::default();
19877        __struct.count = buf.get_u16_le()?;
19878        __struct.target_system = buf.get_u8()?;
19879        __struct.target_component = buf.get_u8()?;
19880        let tmp = buf.get_u8()?;
19881        __struct.mission_type =
19882            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19883                enum_type: "MavMissionType",
19884                value: tmp as u64,
19885            })?;
19886        __struct.opaque_id = buf.get_u32_le()?;
19887        Ok(__struct)
19888    }
19889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19890        let mut __tmp = BytesMut::new(bytes);
19891        #[allow(clippy::absurd_extreme_comparisons)]
19892        #[allow(unused_comparisons)]
19893        if __tmp.remaining() < Self::ENCODED_LEN {
19894            panic!(
19895                "buffer is too small (need {} bytes, but got {})",
19896                Self::ENCODED_LEN,
19897                __tmp.remaining(),
19898            )
19899        }
19900        __tmp.put_u16_le(self.count);
19901        __tmp.put_u8(self.target_system);
19902        __tmp.put_u8(self.target_component);
19903        if matches!(version, MavlinkVersion::V2) {
19904            __tmp.put_u8(self.mission_type as u8);
19905            __tmp.put_u32_le(self.opaque_id);
19906            let len = __tmp.len();
19907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19908        } else {
19909            __tmp.len()
19910        }
19911    }
19912}
19913#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19914#[doc = ""]
19915#[doc = "ID: 42"]
19916#[derive(Debug, Clone, PartialEq)]
19917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19919#[cfg_attr(feature = "ts", derive(TS))]
19920#[cfg_attr(feature = "ts", ts(export))]
19921pub struct MISSION_CURRENT_DATA {
19922    #[doc = "Sequence"]
19923    pub seq: u16,
19924    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19926    pub total: u16,
19927    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19928    #[cfg_attr(feature = "serde", serde(default))]
19929    pub mission_state: MissionState,
19930    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19932    pub mission_mode: u8,
19933    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19935    pub mission_id: u32,
19936    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19938    pub fence_id: u32,
19939    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19941    pub rally_points_id: u32,
19942}
19943impl MISSION_CURRENT_DATA {
19944    pub const ENCODED_LEN: usize = 18usize;
19945    pub const DEFAULT: Self = Self {
19946        seq: 0_u16,
19947        total: 0_u16,
19948        mission_state: MissionState::DEFAULT,
19949        mission_mode: 0_u8,
19950        mission_id: 0_u32,
19951        fence_id: 0_u32,
19952        rally_points_id: 0_u32,
19953    };
19954    #[cfg(feature = "arbitrary")]
19955    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19956        use arbitrary::{Arbitrary, Unstructured};
19957        let mut buf = [0u8; 1024];
19958        rng.fill_bytes(&mut buf);
19959        let mut unstructured = Unstructured::new(&buf);
19960        Self::arbitrary(&mut unstructured).unwrap_or_default()
19961    }
19962}
19963impl Default for MISSION_CURRENT_DATA {
19964    fn default() -> Self {
19965        Self::DEFAULT.clone()
19966    }
19967}
19968impl MessageData for MISSION_CURRENT_DATA {
19969    type Message = MavMessage;
19970    const ID: u32 = 42u32;
19971    const NAME: &'static str = "MISSION_CURRENT";
19972    const EXTRA_CRC: u8 = 28u8;
19973    const ENCODED_LEN: usize = 18usize;
19974    fn deser(
19975        _version: MavlinkVersion,
19976        __input: &[u8],
19977    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19978        let avail_len = __input.len();
19979        let mut payload_buf = [0; Self::ENCODED_LEN];
19980        let mut buf = if avail_len < Self::ENCODED_LEN {
19981            payload_buf[0..avail_len].copy_from_slice(__input);
19982            Bytes::new(&payload_buf)
19983        } else {
19984            Bytes::new(__input)
19985        };
19986        let mut __struct = Self::default();
19987        __struct.seq = buf.get_u16_le()?;
19988        __struct.total = buf.get_u16_le()?;
19989        let tmp = buf.get_u8()?;
19990        __struct.mission_state =
19991            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19992                enum_type: "MissionState",
19993                value: tmp as u64,
19994            })?;
19995        __struct.mission_mode = buf.get_u8()?;
19996        __struct.mission_id = buf.get_u32_le()?;
19997        __struct.fence_id = buf.get_u32_le()?;
19998        __struct.rally_points_id = buf.get_u32_le()?;
19999        Ok(__struct)
20000    }
20001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20002        let mut __tmp = BytesMut::new(bytes);
20003        #[allow(clippy::absurd_extreme_comparisons)]
20004        #[allow(unused_comparisons)]
20005        if __tmp.remaining() < Self::ENCODED_LEN {
20006            panic!(
20007                "buffer is too small (need {} bytes, but got {})",
20008                Self::ENCODED_LEN,
20009                __tmp.remaining(),
20010            )
20011        }
20012        __tmp.put_u16_le(self.seq);
20013        if matches!(version, MavlinkVersion::V2) {
20014            __tmp.put_u16_le(self.total);
20015            __tmp.put_u8(self.mission_state as u8);
20016            __tmp.put_u8(self.mission_mode);
20017            __tmp.put_u32_le(self.mission_id);
20018            __tmp.put_u32_le(self.fence_id);
20019            __tmp.put_u32_le(self.rally_points_id);
20020            let len = __tmp.len();
20021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20022        } else {
20023            __tmp.len()
20024        }
20025    }
20026}
20027#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20028#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20029#[doc = ""]
20030#[doc = "ID: 39"]
20031#[derive(Debug, Clone, PartialEq)]
20032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20034#[cfg_attr(feature = "ts", derive(TS))]
20035#[cfg_attr(feature = "ts", ts(export))]
20036pub struct MISSION_ITEM_DATA {
20037    #[doc = "PARAM1, see MAV_CMD enum"]
20038    pub param1: f32,
20039    #[doc = "PARAM2, see MAV_CMD enum"]
20040    pub param2: f32,
20041    #[doc = "PARAM3, see MAV_CMD enum"]
20042    pub param3: f32,
20043    #[doc = "PARAM4, see MAV_CMD enum"]
20044    pub param4: f32,
20045    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20046    pub x: f32,
20047    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20048    pub y: f32,
20049    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20050    pub z: f32,
20051    #[doc = "Sequence"]
20052    pub seq: u16,
20053    #[doc = "The scheduled action for the waypoint."]
20054    pub command: MavCmd,
20055    #[doc = "System ID"]
20056    pub target_system: u8,
20057    #[doc = "Component ID"]
20058    pub target_component: u8,
20059    #[doc = "The coordinate system of the waypoint."]
20060    pub frame: MavFrame,
20061    #[doc = "false:0, true:1"]
20062    pub current: u8,
20063    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20064    pub autocontinue: u8,
20065    #[doc = "Mission type."]
20066    #[cfg_attr(feature = "serde", serde(default))]
20067    pub mission_type: MavMissionType,
20068}
20069impl MISSION_ITEM_DATA {
20070    pub const ENCODED_LEN: usize = 38usize;
20071    pub const DEFAULT: Self = Self {
20072        param1: 0.0_f32,
20073        param2: 0.0_f32,
20074        param3: 0.0_f32,
20075        param4: 0.0_f32,
20076        x: 0.0_f32,
20077        y: 0.0_f32,
20078        z: 0.0_f32,
20079        seq: 0_u16,
20080        command: MavCmd::DEFAULT,
20081        target_system: 0_u8,
20082        target_component: 0_u8,
20083        frame: MavFrame::DEFAULT,
20084        current: 0_u8,
20085        autocontinue: 0_u8,
20086        mission_type: MavMissionType::DEFAULT,
20087    };
20088    #[cfg(feature = "arbitrary")]
20089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20090        use arbitrary::{Arbitrary, Unstructured};
20091        let mut buf = [0u8; 1024];
20092        rng.fill_bytes(&mut buf);
20093        let mut unstructured = Unstructured::new(&buf);
20094        Self::arbitrary(&mut unstructured).unwrap_or_default()
20095    }
20096}
20097impl Default for MISSION_ITEM_DATA {
20098    fn default() -> Self {
20099        Self::DEFAULT.clone()
20100    }
20101}
20102impl MessageData for MISSION_ITEM_DATA {
20103    type Message = MavMessage;
20104    const ID: u32 = 39u32;
20105    const NAME: &'static str = "MISSION_ITEM";
20106    const EXTRA_CRC: u8 = 254u8;
20107    const ENCODED_LEN: usize = 38usize;
20108    fn deser(
20109        _version: MavlinkVersion,
20110        __input: &[u8],
20111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20112        let avail_len = __input.len();
20113        let mut payload_buf = [0; Self::ENCODED_LEN];
20114        let mut buf = if avail_len < Self::ENCODED_LEN {
20115            payload_buf[0..avail_len].copy_from_slice(__input);
20116            Bytes::new(&payload_buf)
20117        } else {
20118            Bytes::new(__input)
20119        };
20120        let mut __struct = Self::default();
20121        __struct.param1 = buf.get_f32_le()?;
20122        __struct.param2 = buf.get_f32_le()?;
20123        __struct.param3 = buf.get_f32_le()?;
20124        __struct.param4 = buf.get_f32_le()?;
20125        __struct.x = buf.get_f32_le()?;
20126        __struct.y = buf.get_f32_le()?;
20127        __struct.z = buf.get_f32_le()?;
20128        __struct.seq = buf.get_u16_le()?;
20129        let tmp = buf.get_u16_le()?;
20130        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20131            ::mavlink_core::error::ParserError::InvalidEnum {
20132                enum_type: "MavCmd",
20133                value: tmp as u64,
20134            },
20135        )?;
20136        __struct.target_system = buf.get_u8()?;
20137        __struct.target_component = buf.get_u8()?;
20138        let tmp = buf.get_u8()?;
20139        __struct.frame =
20140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20141                enum_type: "MavFrame",
20142                value: tmp as u64,
20143            })?;
20144        __struct.current = buf.get_u8()?;
20145        __struct.autocontinue = buf.get_u8()?;
20146        let tmp = buf.get_u8()?;
20147        __struct.mission_type =
20148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20149                enum_type: "MavMissionType",
20150                value: tmp as u64,
20151            })?;
20152        Ok(__struct)
20153    }
20154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20155        let mut __tmp = BytesMut::new(bytes);
20156        #[allow(clippy::absurd_extreme_comparisons)]
20157        #[allow(unused_comparisons)]
20158        if __tmp.remaining() < Self::ENCODED_LEN {
20159            panic!(
20160                "buffer is too small (need {} bytes, but got {})",
20161                Self::ENCODED_LEN,
20162                __tmp.remaining(),
20163            )
20164        }
20165        __tmp.put_f32_le(self.param1);
20166        __tmp.put_f32_le(self.param2);
20167        __tmp.put_f32_le(self.param3);
20168        __tmp.put_f32_le(self.param4);
20169        __tmp.put_f32_le(self.x);
20170        __tmp.put_f32_le(self.y);
20171        __tmp.put_f32_le(self.z);
20172        __tmp.put_u16_le(self.seq);
20173        __tmp.put_u16_le(self.command as u16);
20174        __tmp.put_u8(self.target_system);
20175        __tmp.put_u8(self.target_component);
20176        __tmp.put_u8(self.frame as u8);
20177        __tmp.put_u8(self.current);
20178        __tmp.put_u8(self.autocontinue);
20179        if matches!(version, MavlinkVersion::V2) {
20180            __tmp.put_u8(self.mission_type as u8);
20181            let len = __tmp.len();
20182            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20183        } else {
20184            __tmp.len()
20185        }
20186    }
20187}
20188#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20189#[doc = ""]
20190#[doc = "ID: 73"]
20191#[derive(Debug, Clone, PartialEq)]
20192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20194#[cfg_attr(feature = "ts", derive(TS))]
20195#[cfg_attr(feature = "ts", ts(export))]
20196pub struct MISSION_ITEM_INT_DATA {
20197    #[doc = "PARAM1, see MAV_CMD enum"]
20198    pub param1: f32,
20199    #[doc = "PARAM2, see MAV_CMD enum"]
20200    pub param2: f32,
20201    #[doc = "PARAM3, see MAV_CMD enum"]
20202    pub param3: f32,
20203    #[doc = "PARAM4, see MAV_CMD enum"]
20204    pub param4: f32,
20205    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20206    pub x: i32,
20207    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20208    pub y: i32,
20209    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20210    pub z: f32,
20211    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20212    pub seq: u16,
20213    #[doc = "The scheduled action for the waypoint."]
20214    pub command: MavCmd,
20215    #[doc = "System ID"]
20216    pub target_system: u8,
20217    #[doc = "Component ID"]
20218    pub target_component: u8,
20219    #[doc = "The coordinate system of the waypoint."]
20220    pub frame: MavFrame,
20221    #[doc = "false:0, true:1"]
20222    pub current: u8,
20223    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20224    pub autocontinue: u8,
20225    #[doc = "Mission type."]
20226    #[cfg_attr(feature = "serde", serde(default))]
20227    pub mission_type: MavMissionType,
20228}
20229impl MISSION_ITEM_INT_DATA {
20230    pub const ENCODED_LEN: usize = 38usize;
20231    pub const DEFAULT: Self = Self {
20232        param1: 0.0_f32,
20233        param2: 0.0_f32,
20234        param3: 0.0_f32,
20235        param4: 0.0_f32,
20236        x: 0_i32,
20237        y: 0_i32,
20238        z: 0.0_f32,
20239        seq: 0_u16,
20240        command: MavCmd::DEFAULT,
20241        target_system: 0_u8,
20242        target_component: 0_u8,
20243        frame: MavFrame::DEFAULT,
20244        current: 0_u8,
20245        autocontinue: 0_u8,
20246        mission_type: MavMissionType::DEFAULT,
20247    };
20248    #[cfg(feature = "arbitrary")]
20249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20250        use arbitrary::{Arbitrary, Unstructured};
20251        let mut buf = [0u8; 1024];
20252        rng.fill_bytes(&mut buf);
20253        let mut unstructured = Unstructured::new(&buf);
20254        Self::arbitrary(&mut unstructured).unwrap_or_default()
20255    }
20256}
20257impl Default for MISSION_ITEM_INT_DATA {
20258    fn default() -> Self {
20259        Self::DEFAULT.clone()
20260    }
20261}
20262impl MessageData for MISSION_ITEM_INT_DATA {
20263    type Message = MavMessage;
20264    const ID: u32 = 73u32;
20265    const NAME: &'static str = "MISSION_ITEM_INT";
20266    const EXTRA_CRC: u8 = 38u8;
20267    const ENCODED_LEN: usize = 38usize;
20268    fn deser(
20269        _version: MavlinkVersion,
20270        __input: &[u8],
20271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20272        let avail_len = __input.len();
20273        let mut payload_buf = [0; Self::ENCODED_LEN];
20274        let mut buf = if avail_len < Self::ENCODED_LEN {
20275            payload_buf[0..avail_len].copy_from_slice(__input);
20276            Bytes::new(&payload_buf)
20277        } else {
20278            Bytes::new(__input)
20279        };
20280        let mut __struct = Self::default();
20281        __struct.param1 = buf.get_f32_le()?;
20282        __struct.param2 = buf.get_f32_le()?;
20283        __struct.param3 = buf.get_f32_le()?;
20284        __struct.param4 = buf.get_f32_le()?;
20285        __struct.x = buf.get_i32_le()?;
20286        __struct.y = buf.get_i32_le()?;
20287        __struct.z = buf.get_f32_le()?;
20288        __struct.seq = buf.get_u16_le()?;
20289        let tmp = buf.get_u16_le()?;
20290        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20291            ::mavlink_core::error::ParserError::InvalidEnum {
20292                enum_type: "MavCmd",
20293                value: tmp as u64,
20294            },
20295        )?;
20296        __struct.target_system = buf.get_u8()?;
20297        __struct.target_component = buf.get_u8()?;
20298        let tmp = buf.get_u8()?;
20299        __struct.frame =
20300            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20301                enum_type: "MavFrame",
20302                value: tmp as u64,
20303            })?;
20304        __struct.current = buf.get_u8()?;
20305        __struct.autocontinue = buf.get_u8()?;
20306        let tmp = buf.get_u8()?;
20307        __struct.mission_type =
20308            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20309                enum_type: "MavMissionType",
20310                value: tmp as u64,
20311            })?;
20312        Ok(__struct)
20313    }
20314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20315        let mut __tmp = BytesMut::new(bytes);
20316        #[allow(clippy::absurd_extreme_comparisons)]
20317        #[allow(unused_comparisons)]
20318        if __tmp.remaining() < Self::ENCODED_LEN {
20319            panic!(
20320                "buffer is too small (need {} bytes, but got {})",
20321                Self::ENCODED_LEN,
20322                __tmp.remaining(),
20323            )
20324        }
20325        __tmp.put_f32_le(self.param1);
20326        __tmp.put_f32_le(self.param2);
20327        __tmp.put_f32_le(self.param3);
20328        __tmp.put_f32_le(self.param4);
20329        __tmp.put_i32_le(self.x);
20330        __tmp.put_i32_le(self.y);
20331        __tmp.put_f32_le(self.z);
20332        __tmp.put_u16_le(self.seq);
20333        __tmp.put_u16_le(self.command as u16);
20334        __tmp.put_u8(self.target_system);
20335        __tmp.put_u8(self.target_component);
20336        __tmp.put_u8(self.frame as u8);
20337        __tmp.put_u8(self.current);
20338        __tmp.put_u8(self.autocontinue);
20339        if matches!(version, MavlinkVersion::V2) {
20340            __tmp.put_u8(self.mission_type as u8);
20341            let len = __tmp.len();
20342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20343        } else {
20344            __tmp.len()
20345        }
20346    }
20347}
20348#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20349#[doc = ""]
20350#[doc = "ID: 46"]
20351#[derive(Debug, Clone, PartialEq)]
20352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20354#[cfg_attr(feature = "ts", derive(TS))]
20355#[cfg_attr(feature = "ts", ts(export))]
20356pub struct MISSION_ITEM_REACHED_DATA {
20357    #[doc = "Sequence"]
20358    pub seq: u16,
20359}
20360impl MISSION_ITEM_REACHED_DATA {
20361    pub const ENCODED_LEN: usize = 2usize;
20362    pub const DEFAULT: Self = Self { seq: 0_u16 };
20363    #[cfg(feature = "arbitrary")]
20364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20365        use arbitrary::{Arbitrary, Unstructured};
20366        let mut buf = [0u8; 1024];
20367        rng.fill_bytes(&mut buf);
20368        let mut unstructured = Unstructured::new(&buf);
20369        Self::arbitrary(&mut unstructured).unwrap_or_default()
20370    }
20371}
20372impl Default for MISSION_ITEM_REACHED_DATA {
20373    fn default() -> Self {
20374        Self::DEFAULT.clone()
20375    }
20376}
20377impl MessageData for MISSION_ITEM_REACHED_DATA {
20378    type Message = MavMessage;
20379    const ID: u32 = 46u32;
20380    const NAME: &'static str = "MISSION_ITEM_REACHED";
20381    const EXTRA_CRC: u8 = 11u8;
20382    const ENCODED_LEN: usize = 2usize;
20383    fn deser(
20384        _version: MavlinkVersion,
20385        __input: &[u8],
20386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20387        let avail_len = __input.len();
20388        let mut payload_buf = [0; Self::ENCODED_LEN];
20389        let mut buf = if avail_len < Self::ENCODED_LEN {
20390            payload_buf[0..avail_len].copy_from_slice(__input);
20391            Bytes::new(&payload_buf)
20392        } else {
20393            Bytes::new(__input)
20394        };
20395        let mut __struct = Self::default();
20396        __struct.seq = buf.get_u16_le()?;
20397        Ok(__struct)
20398    }
20399    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20400        let mut __tmp = BytesMut::new(bytes);
20401        #[allow(clippy::absurd_extreme_comparisons)]
20402        #[allow(unused_comparisons)]
20403        if __tmp.remaining() < Self::ENCODED_LEN {
20404            panic!(
20405                "buffer is too small (need {} bytes, but got {})",
20406                Self::ENCODED_LEN,
20407                __tmp.remaining(),
20408            )
20409        }
20410        __tmp.put_u16_le(self.seq);
20411        if matches!(version, MavlinkVersion::V2) {
20412            let len = __tmp.len();
20413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20414        } else {
20415            __tmp.len()
20416        }
20417    }
20418}
20419#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20420#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20421#[doc = ""]
20422#[doc = "ID: 40"]
20423#[derive(Debug, Clone, PartialEq)]
20424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20426#[cfg_attr(feature = "ts", derive(TS))]
20427#[cfg_attr(feature = "ts", ts(export))]
20428pub struct MISSION_REQUEST_DATA {
20429    #[doc = "Sequence"]
20430    pub seq: u16,
20431    #[doc = "System ID"]
20432    pub target_system: u8,
20433    #[doc = "Component ID"]
20434    pub target_component: u8,
20435    #[doc = "Mission type."]
20436    #[cfg_attr(feature = "serde", serde(default))]
20437    pub mission_type: MavMissionType,
20438}
20439impl MISSION_REQUEST_DATA {
20440    pub const ENCODED_LEN: usize = 5usize;
20441    pub const DEFAULT: Self = Self {
20442        seq: 0_u16,
20443        target_system: 0_u8,
20444        target_component: 0_u8,
20445        mission_type: MavMissionType::DEFAULT,
20446    };
20447    #[cfg(feature = "arbitrary")]
20448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20449        use arbitrary::{Arbitrary, Unstructured};
20450        let mut buf = [0u8; 1024];
20451        rng.fill_bytes(&mut buf);
20452        let mut unstructured = Unstructured::new(&buf);
20453        Self::arbitrary(&mut unstructured).unwrap_or_default()
20454    }
20455}
20456impl Default for MISSION_REQUEST_DATA {
20457    fn default() -> Self {
20458        Self::DEFAULT.clone()
20459    }
20460}
20461impl MessageData for MISSION_REQUEST_DATA {
20462    type Message = MavMessage;
20463    const ID: u32 = 40u32;
20464    const NAME: &'static str = "MISSION_REQUEST";
20465    const EXTRA_CRC: u8 = 230u8;
20466    const ENCODED_LEN: usize = 5usize;
20467    fn deser(
20468        _version: MavlinkVersion,
20469        __input: &[u8],
20470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20471        let avail_len = __input.len();
20472        let mut payload_buf = [0; Self::ENCODED_LEN];
20473        let mut buf = if avail_len < Self::ENCODED_LEN {
20474            payload_buf[0..avail_len].copy_from_slice(__input);
20475            Bytes::new(&payload_buf)
20476        } else {
20477            Bytes::new(__input)
20478        };
20479        let mut __struct = Self::default();
20480        __struct.seq = buf.get_u16_le()?;
20481        __struct.target_system = buf.get_u8()?;
20482        __struct.target_component = buf.get_u8()?;
20483        let tmp = buf.get_u8()?;
20484        __struct.mission_type =
20485            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20486                enum_type: "MavMissionType",
20487                value: tmp as u64,
20488            })?;
20489        Ok(__struct)
20490    }
20491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20492        let mut __tmp = BytesMut::new(bytes);
20493        #[allow(clippy::absurd_extreme_comparisons)]
20494        #[allow(unused_comparisons)]
20495        if __tmp.remaining() < Self::ENCODED_LEN {
20496            panic!(
20497                "buffer is too small (need {} bytes, but got {})",
20498                Self::ENCODED_LEN,
20499                __tmp.remaining(),
20500            )
20501        }
20502        __tmp.put_u16_le(self.seq);
20503        __tmp.put_u8(self.target_system);
20504        __tmp.put_u8(self.target_component);
20505        if matches!(version, MavlinkVersion::V2) {
20506            __tmp.put_u8(self.mission_type as u8);
20507            let len = __tmp.len();
20508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20509        } else {
20510            __tmp.len()
20511        }
20512    }
20513}
20514#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20515#[doc = ""]
20516#[doc = "ID: 51"]
20517#[derive(Debug, Clone, PartialEq)]
20518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20520#[cfg_attr(feature = "ts", derive(TS))]
20521#[cfg_attr(feature = "ts", ts(export))]
20522pub struct MISSION_REQUEST_INT_DATA {
20523    #[doc = "Sequence"]
20524    pub seq: u16,
20525    #[doc = "System ID"]
20526    pub target_system: u8,
20527    #[doc = "Component ID"]
20528    pub target_component: u8,
20529    #[doc = "Mission type."]
20530    #[cfg_attr(feature = "serde", serde(default))]
20531    pub mission_type: MavMissionType,
20532}
20533impl MISSION_REQUEST_INT_DATA {
20534    pub const ENCODED_LEN: usize = 5usize;
20535    pub const DEFAULT: Self = Self {
20536        seq: 0_u16,
20537        target_system: 0_u8,
20538        target_component: 0_u8,
20539        mission_type: MavMissionType::DEFAULT,
20540    };
20541    #[cfg(feature = "arbitrary")]
20542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20543        use arbitrary::{Arbitrary, Unstructured};
20544        let mut buf = [0u8; 1024];
20545        rng.fill_bytes(&mut buf);
20546        let mut unstructured = Unstructured::new(&buf);
20547        Self::arbitrary(&mut unstructured).unwrap_or_default()
20548    }
20549}
20550impl Default for MISSION_REQUEST_INT_DATA {
20551    fn default() -> Self {
20552        Self::DEFAULT.clone()
20553    }
20554}
20555impl MessageData for MISSION_REQUEST_INT_DATA {
20556    type Message = MavMessage;
20557    const ID: u32 = 51u32;
20558    const NAME: &'static str = "MISSION_REQUEST_INT";
20559    const EXTRA_CRC: u8 = 196u8;
20560    const ENCODED_LEN: usize = 5usize;
20561    fn deser(
20562        _version: MavlinkVersion,
20563        __input: &[u8],
20564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20565        let avail_len = __input.len();
20566        let mut payload_buf = [0; Self::ENCODED_LEN];
20567        let mut buf = if avail_len < Self::ENCODED_LEN {
20568            payload_buf[0..avail_len].copy_from_slice(__input);
20569            Bytes::new(&payload_buf)
20570        } else {
20571            Bytes::new(__input)
20572        };
20573        let mut __struct = Self::default();
20574        __struct.seq = buf.get_u16_le()?;
20575        __struct.target_system = buf.get_u8()?;
20576        __struct.target_component = buf.get_u8()?;
20577        let tmp = buf.get_u8()?;
20578        __struct.mission_type =
20579            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20580                enum_type: "MavMissionType",
20581                value: tmp as u64,
20582            })?;
20583        Ok(__struct)
20584    }
20585    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20586        let mut __tmp = BytesMut::new(bytes);
20587        #[allow(clippy::absurd_extreme_comparisons)]
20588        #[allow(unused_comparisons)]
20589        if __tmp.remaining() < Self::ENCODED_LEN {
20590            panic!(
20591                "buffer is too small (need {} bytes, but got {})",
20592                Self::ENCODED_LEN,
20593                __tmp.remaining(),
20594            )
20595        }
20596        __tmp.put_u16_le(self.seq);
20597        __tmp.put_u8(self.target_system);
20598        __tmp.put_u8(self.target_component);
20599        if matches!(version, MavlinkVersion::V2) {
20600            __tmp.put_u8(self.mission_type as u8);
20601            let len = __tmp.len();
20602            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20603        } else {
20604            __tmp.len()
20605        }
20606    }
20607}
20608#[doc = "Request the overall list of mission items from the system/component."]
20609#[doc = ""]
20610#[doc = "ID: 43"]
20611#[derive(Debug, Clone, PartialEq)]
20612#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20613#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20614#[cfg_attr(feature = "ts", derive(TS))]
20615#[cfg_attr(feature = "ts", ts(export))]
20616pub struct MISSION_REQUEST_LIST_DATA {
20617    #[doc = "System ID"]
20618    pub target_system: u8,
20619    #[doc = "Component ID"]
20620    pub target_component: u8,
20621    #[doc = "Mission type."]
20622    #[cfg_attr(feature = "serde", serde(default))]
20623    pub mission_type: MavMissionType,
20624}
20625impl MISSION_REQUEST_LIST_DATA {
20626    pub const ENCODED_LEN: usize = 3usize;
20627    pub const DEFAULT: Self = Self {
20628        target_system: 0_u8,
20629        target_component: 0_u8,
20630        mission_type: MavMissionType::DEFAULT,
20631    };
20632    #[cfg(feature = "arbitrary")]
20633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20634        use arbitrary::{Arbitrary, Unstructured};
20635        let mut buf = [0u8; 1024];
20636        rng.fill_bytes(&mut buf);
20637        let mut unstructured = Unstructured::new(&buf);
20638        Self::arbitrary(&mut unstructured).unwrap_or_default()
20639    }
20640}
20641impl Default for MISSION_REQUEST_LIST_DATA {
20642    fn default() -> Self {
20643        Self::DEFAULT.clone()
20644    }
20645}
20646impl MessageData for MISSION_REQUEST_LIST_DATA {
20647    type Message = MavMessage;
20648    const ID: u32 = 43u32;
20649    const NAME: &'static str = "MISSION_REQUEST_LIST";
20650    const EXTRA_CRC: u8 = 132u8;
20651    const ENCODED_LEN: usize = 3usize;
20652    fn deser(
20653        _version: MavlinkVersion,
20654        __input: &[u8],
20655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20656        let avail_len = __input.len();
20657        let mut payload_buf = [0; Self::ENCODED_LEN];
20658        let mut buf = if avail_len < Self::ENCODED_LEN {
20659            payload_buf[0..avail_len].copy_from_slice(__input);
20660            Bytes::new(&payload_buf)
20661        } else {
20662            Bytes::new(__input)
20663        };
20664        let mut __struct = Self::default();
20665        __struct.target_system = buf.get_u8()?;
20666        __struct.target_component = buf.get_u8()?;
20667        let tmp = buf.get_u8()?;
20668        __struct.mission_type =
20669            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20670                enum_type: "MavMissionType",
20671                value: tmp as u64,
20672            })?;
20673        Ok(__struct)
20674    }
20675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20676        let mut __tmp = BytesMut::new(bytes);
20677        #[allow(clippy::absurd_extreme_comparisons)]
20678        #[allow(unused_comparisons)]
20679        if __tmp.remaining() < Self::ENCODED_LEN {
20680            panic!(
20681                "buffer is too small (need {} bytes, but got {})",
20682                Self::ENCODED_LEN,
20683                __tmp.remaining(),
20684            )
20685        }
20686        __tmp.put_u8(self.target_system);
20687        __tmp.put_u8(self.target_component);
20688        if matches!(version, MavlinkVersion::V2) {
20689            __tmp.put_u8(self.mission_type as u8);
20690            let len = __tmp.len();
20691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20692        } else {
20693            __tmp.len()
20694        }
20695    }
20696}
20697#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20698#[doc = ""]
20699#[doc = "ID: 37"]
20700#[derive(Debug, Clone, PartialEq)]
20701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20703#[cfg_attr(feature = "ts", derive(TS))]
20704#[cfg_attr(feature = "ts", ts(export))]
20705pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20706    #[doc = "Start index"]
20707    pub start_index: i16,
20708    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20709    pub end_index: i16,
20710    #[doc = "System ID"]
20711    pub target_system: u8,
20712    #[doc = "Component ID"]
20713    pub target_component: u8,
20714    #[doc = "Mission type."]
20715    #[cfg_attr(feature = "serde", serde(default))]
20716    pub mission_type: MavMissionType,
20717}
20718impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20719    pub const ENCODED_LEN: usize = 7usize;
20720    pub const DEFAULT: Self = Self {
20721        start_index: 0_i16,
20722        end_index: 0_i16,
20723        target_system: 0_u8,
20724        target_component: 0_u8,
20725        mission_type: MavMissionType::DEFAULT,
20726    };
20727    #[cfg(feature = "arbitrary")]
20728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20729        use arbitrary::{Arbitrary, Unstructured};
20730        let mut buf = [0u8; 1024];
20731        rng.fill_bytes(&mut buf);
20732        let mut unstructured = Unstructured::new(&buf);
20733        Self::arbitrary(&mut unstructured).unwrap_or_default()
20734    }
20735}
20736impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20737    fn default() -> Self {
20738        Self::DEFAULT.clone()
20739    }
20740}
20741impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20742    type Message = MavMessage;
20743    const ID: u32 = 37u32;
20744    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20745    const EXTRA_CRC: u8 = 212u8;
20746    const ENCODED_LEN: usize = 7usize;
20747    fn deser(
20748        _version: MavlinkVersion,
20749        __input: &[u8],
20750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20751        let avail_len = __input.len();
20752        let mut payload_buf = [0; Self::ENCODED_LEN];
20753        let mut buf = if avail_len < Self::ENCODED_LEN {
20754            payload_buf[0..avail_len].copy_from_slice(__input);
20755            Bytes::new(&payload_buf)
20756        } else {
20757            Bytes::new(__input)
20758        };
20759        let mut __struct = Self::default();
20760        __struct.start_index = buf.get_i16_le()?;
20761        __struct.end_index = buf.get_i16_le()?;
20762        __struct.target_system = buf.get_u8()?;
20763        __struct.target_component = buf.get_u8()?;
20764        let tmp = buf.get_u8()?;
20765        __struct.mission_type =
20766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20767                enum_type: "MavMissionType",
20768                value: tmp as u64,
20769            })?;
20770        Ok(__struct)
20771    }
20772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20773        let mut __tmp = BytesMut::new(bytes);
20774        #[allow(clippy::absurd_extreme_comparisons)]
20775        #[allow(unused_comparisons)]
20776        if __tmp.remaining() < Self::ENCODED_LEN {
20777            panic!(
20778                "buffer is too small (need {} bytes, but got {})",
20779                Self::ENCODED_LEN,
20780                __tmp.remaining(),
20781            )
20782        }
20783        __tmp.put_i16_le(self.start_index);
20784        __tmp.put_i16_le(self.end_index);
20785        __tmp.put_u8(self.target_system);
20786        __tmp.put_u8(self.target_component);
20787        if matches!(version, MavlinkVersion::V2) {
20788            __tmp.put_u8(self.mission_type as u8);
20789            let len = __tmp.len();
20790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20791        } else {
20792            __tmp.len()
20793        }
20794    }
20795}
20796#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20797#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20798#[doc = ""]
20799#[doc = "ID: 41"]
20800#[derive(Debug, Clone, PartialEq)]
20801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20803#[cfg_attr(feature = "ts", derive(TS))]
20804#[cfg_attr(feature = "ts", ts(export))]
20805pub struct MISSION_SET_CURRENT_DATA {
20806    #[doc = "Sequence"]
20807    pub seq: u16,
20808    #[doc = "System ID"]
20809    pub target_system: u8,
20810    #[doc = "Component ID"]
20811    pub target_component: u8,
20812}
20813impl MISSION_SET_CURRENT_DATA {
20814    pub const ENCODED_LEN: usize = 4usize;
20815    pub const DEFAULT: Self = Self {
20816        seq: 0_u16,
20817        target_system: 0_u8,
20818        target_component: 0_u8,
20819    };
20820    #[cfg(feature = "arbitrary")]
20821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20822        use arbitrary::{Arbitrary, Unstructured};
20823        let mut buf = [0u8; 1024];
20824        rng.fill_bytes(&mut buf);
20825        let mut unstructured = Unstructured::new(&buf);
20826        Self::arbitrary(&mut unstructured).unwrap_or_default()
20827    }
20828}
20829impl Default for MISSION_SET_CURRENT_DATA {
20830    fn default() -> Self {
20831        Self::DEFAULT.clone()
20832    }
20833}
20834impl MessageData for MISSION_SET_CURRENT_DATA {
20835    type Message = MavMessage;
20836    const ID: u32 = 41u32;
20837    const NAME: &'static str = "MISSION_SET_CURRENT";
20838    const EXTRA_CRC: u8 = 28u8;
20839    const ENCODED_LEN: usize = 4usize;
20840    fn deser(
20841        _version: MavlinkVersion,
20842        __input: &[u8],
20843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20844        let avail_len = __input.len();
20845        let mut payload_buf = [0; Self::ENCODED_LEN];
20846        let mut buf = if avail_len < Self::ENCODED_LEN {
20847            payload_buf[0..avail_len].copy_from_slice(__input);
20848            Bytes::new(&payload_buf)
20849        } else {
20850            Bytes::new(__input)
20851        };
20852        let mut __struct = Self::default();
20853        __struct.seq = buf.get_u16_le()?;
20854        __struct.target_system = buf.get_u8()?;
20855        __struct.target_component = buf.get_u8()?;
20856        Ok(__struct)
20857    }
20858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20859        let mut __tmp = BytesMut::new(bytes);
20860        #[allow(clippy::absurd_extreme_comparisons)]
20861        #[allow(unused_comparisons)]
20862        if __tmp.remaining() < Self::ENCODED_LEN {
20863            panic!(
20864                "buffer is too small (need {} bytes, but got {})",
20865                Self::ENCODED_LEN,
20866                __tmp.remaining(),
20867            )
20868        }
20869        __tmp.put_u16_le(self.seq);
20870        __tmp.put_u8(self.target_system);
20871        __tmp.put_u8(self.target_component);
20872        if matches!(version, MavlinkVersion::V2) {
20873            let len = __tmp.len();
20874            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20875        } else {
20876            __tmp.len()
20877        }
20878    }
20879}
20880#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20881#[doc = ""]
20882#[doc = "ID: 38"]
20883#[derive(Debug, Clone, PartialEq)]
20884#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20885#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20886#[cfg_attr(feature = "ts", derive(TS))]
20887#[cfg_attr(feature = "ts", ts(export))]
20888pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20889    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20890    pub start_index: i16,
20891    #[doc = "End index, equal or greater than start index."]
20892    pub end_index: i16,
20893    #[doc = "System ID"]
20894    pub target_system: u8,
20895    #[doc = "Component ID"]
20896    pub target_component: u8,
20897    #[doc = "Mission type."]
20898    #[cfg_attr(feature = "serde", serde(default))]
20899    pub mission_type: MavMissionType,
20900}
20901impl MISSION_WRITE_PARTIAL_LIST_DATA {
20902    pub const ENCODED_LEN: usize = 7usize;
20903    pub const DEFAULT: Self = Self {
20904        start_index: 0_i16,
20905        end_index: 0_i16,
20906        target_system: 0_u8,
20907        target_component: 0_u8,
20908        mission_type: MavMissionType::DEFAULT,
20909    };
20910    #[cfg(feature = "arbitrary")]
20911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20912        use arbitrary::{Arbitrary, Unstructured};
20913        let mut buf = [0u8; 1024];
20914        rng.fill_bytes(&mut buf);
20915        let mut unstructured = Unstructured::new(&buf);
20916        Self::arbitrary(&mut unstructured).unwrap_or_default()
20917    }
20918}
20919impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20920    fn default() -> Self {
20921        Self::DEFAULT.clone()
20922    }
20923}
20924impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20925    type Message = MavMessage;
20926    const ID: u32 = 38u32;
20927    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20928    const EXTRA_CRC: u8 = 9u8;
20929    const ENCODED_LEN: usize = 7usize;
20930    fn deser(
20931        _version: MavlinkVersion,
20932        __input: &[u8],
20933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20934        let avail_len = __input.len();
20935        let mut payload_buf = [0; Self::ENCODED_LEN];
20936        let mut buf = if avail_len < Self::ENCODED_LEN {
20937            payload_buf[0..avail_len].copy_from_slice(__input);
20938            Bytes::new(&payload_buf)
20939        } else {
20940            Bytes::new(__input)
20941        };
20942        let mut __struct = Self::default();
20943        __struct.start_index = buf.get_i16_le()?;
20944        __struct.end_index = buf.get_i16_le()?;
20945        __struct.target_system = buf.get_u8()?;
20946        __struct.target_component = buf.get_u8()?;
20947        let tmp = buf.get_u8()?;
20948        __struct.mission_type =
20949            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20950                enum_type: "MavMissionType",
20951                value: tmp as u64,
20952            })?;
20953        Ok(__struct)
20954    }
20955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20956        let mut __tmp = BytesMut::new(bytes);
20957        #[allow(clippy::absurd_extreme_comparisons)]
20958        #[allow(unused_comparisons)]
20959        if __tmp.remaining() < Self::ENCODED_LEN {
20960            panic!(
20961                "buffer is too small (need {} bytes, but got {})",
20962                Self::ENCODED_LEN,
20963                __tmp.remaining(),
20964            )
20965        }
20966        __tmp.put_i16_le(self.start_index);
20967        __tmp.put_i16_le(self.end_index);
20968        __tmp.put_u8(self.target_system);
20969        __tmp.put_u8(self.target_component);
20970        if matches!(version, MavlinkVersion::V2) {
20971            __tmp.put_u8(self.mission_type as u8);
20972            let len = __tmp.len();
20973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20974        } else {
20975            __tmp.len()
20976        }
20977    }
20978}
20979#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20980#[doc = "Orientation of a mount."]
20981#[doc = ""]
20982#[doc = "ID: 265"]
20983#[derive(Debug, Clone, PartialEq)]
20984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20986#[cfg_attr(feature = "ts", derive(TS))]
20987#[cfg_attr(feature = "ts", ts(export))]
20988pub struct MOUNT_ORIENTATION_DATA {
20989    #[doc = "Timestamp (time since system boot)."]
20990    pub time_boot_ms: u32,
20991    #[doc = "Roll in global frame (set to NaN for invalid)."]
20992    pub roll: f32,
20993    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20994    pub pitch: f32,
20995    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20996    pub yaw: f32,
20997    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20999    pub yaw_absolute: f32,
21000}
21001impl MOUNT_ORIENTATION_DATA {
21002    pub const ENCODED_LEN: usize = 20usize;
21003    pub const DEFAULT: Self = Self {
21004        time_boot_ms: 0_u32,
21005        roll: 0.0_f32,
21006        pitch: 0.0_f32,
21007        yaw: 0.0_f32,
21008        yaw_absolute: 0.0_f32,
21009    };
21010    #[cfg(feature = "arbitrary")]
21011    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21012        use arbitrary::{Arbitrary, Unstructured};
21013        let mut buf = [0u8; 1024];
21014        rng.fill_bytes(&mut buf);
21015        let mut unstructured = Unstructured::new(&buf);
21016        Self::arbitrary(&mut unstructured).unwrap_or_default()
21017    }
21018}
21019impl Default for MOUNT_ORIENTATION_DATA {
21020    fn default() -> Self {
21021        Self::DEFAULT.clone()
21022    }
21023}
21024impl MessageData for MOUNT_ORIENTATION_DATA {
21025    type Message = MavMessage;
21026    const ID: u32 = 265u32;
21027    const NAME: &'static str = "MOUNT_ORIENTATION";
21028    const EXTRA_CRC: u8 = 26u8;
21029    const ENCODED_LEN: usize = 20usize;
21030    fn deser(
21031        _version: MavlinkVersion,
21032        __input: &[u8],
21033    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21034        let avail_len = __input.len();
21035        let mut payload_buf = [0; Self::ENCODED_LEN];
21036        let mut buf = if avail_len < Self::ENCODED_LEN {
21037            payload_buf[0..avail_len].copy_from_slice(__input);
21038            Bytes::new(&payload_buf)
21039        } else {
21040            Bytes::new(__input)
21041        };
21042        let mut __struct = Self::default();
21043        __struct.time_boot_ms = buf.get_u32_le()?;
21044        __struct.roll = buf.get_f32_le()?;
21045        __struct.pitch = buf.get_f32_le()?;
21046        __struct.yaw = buf.get_f32_le()?;
21047        __struct.yaw_absolute = buf.get_f32_le()?;
21048        Ok(__struct)
21049    }
21050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21051        let mut __tmp = BytesMut::new(bytes);
21052        #[allow(clippy::absurd_extreme_comparisons)]
21053        #[allow(unused_comparisons)]
21054        if __tmp.remaining() < Self::ENCODED_LEN {
21055            panic!(
21056                "buffer is too small (need {} bytes, but got {})",
21057                Self::ENCODED_LEN,
21058                __tmp.remaining(),
21059            )
21060        }
21061        __tmp.put_u32_le(self.time_boot_ms);
21062        __tmp.put_f32_le(self.roll);
21063        __tmp.put_f32_le(self.pitch);
21064        __tmp.put_f32_le(self.yaw);
21065        if matches!(version, MavlinkVersion::V2) {
21066            __tmp.put_f32_le(self.yaw_absolute);
21067            let len = __tmp.len();
21068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21069        } else {
21070            __tmp.len()
21071        }
21072    }
21073}
21074#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21075#[doc = ""]
21076#[doc = "ID: 251"]
21077#[derive(Debug, Clone, PartialEq)]
21078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21080#[cfg_attr(feature = "ts", derive(TS))]
21081#[cfg_attr(feature = "ts", ts(export))]
21082pub struct NAMED_VALUE_FLOAT_DATA {
21083    #[doc = "Timestamp (time since system boot)."]
21084    pub time_boot_ms: u32,
21085    #[doc = "Floating point value"]
21086    pub value: f32,
21087    #[doc = "Name of the debug variable"]
21088    #[cfg_attr(feature = "ts", ts(type = "string"))]
21089    pub name: CharArray<10>,
21090}
21091impl NAMED_VALUE_FLOAT_DATA {
21092    pub const ENCODED_LEN: usize = 18usize;
21093    pub const DEFAULT: Self = Self {
21094        time_boot_ms: 0_u32,
21095        value: 0.0_f32,
21096        name: CharArray::new([0_u8; 10usize]),
21097    };
21098    #[cfg(feature = "arbitrary")]
21099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21100        use arbitrary::{Arbitrary, Unstructured};
21101        let mut buf = [0u8; 1024];
21102        rng.fill_bytes(&mut buf);
21103        let mut unstructured = Unstructured::new(&buf);
21104        Self::arbitrary(&mut unstructured).unwrap_or_default()
21105    }
21106}
21107impl Default for NAMED_VALUE_FLOAT_DATA {
21108    fn default() -> Self {
21109        Self::DEFAULT.clone()
21110    }
21111}
21112impl MessageData for NAMED_VALUE_FLOAT_DATA {
21113    type Message = MavMessage;
21114    const ID: u32 = 251u32;
21115    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21116    const EXTRA_CRC: u8 = 170u8;
21117    const ENCODED_LEN: usize = 18usize;
21118    fn deser(
21119        _version: MavlinkVersion,
21120        __input: &[u8],
21121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21122        let avail_len = __input.len();
21123        let mut payload_buf = [0; Self::ENCODED_LEN];
21124        let mut buf = if avail_len < Self::ENCODED_LEN {
21125            payload_buf[0..avail_len].copy_from_slice(__input);
21126            Bytes::new(&payload_buf)
21127        } else {
21128            Bytes::new(__input)
21129        };
21130        let mut __struct = Self::default();
21131        __struct.time_boot_ms = buf.get_u32_le()?;
21132        __struct.value = buf.get_f32_le()?;
21133        let mut tmp = [0_u8; 10usize];
21134        for v in &mut tmp {
21135            *v = buf.get_u8()?;
21136        }
21137        __struct.name = CharArray::new(tmp);
21138        Ok(__struct)
21139    }
21140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21141        let mut __tmp = BytesMut::new(bytes);
21142        #[allow(clippy::absurd_extreme_comparisons)]
21143        #[allow(unused_comparisons)]
21144        if __tmp.remaining() < Self::ENCODED_LEN {
21145            panic!(
21146                "buffer is too small (need {} bytes, but got {})",
21147                Self::ENCODED_LEN,
21148                __tmp.remaining(),
21149            )
21150        }
21151        __tmp.put_u32_le(self.time_boot_ms);
21152        __tmp.put_f32_le(self.value);
21153        for val in &self.name {
21154            __tmp.put_u8(*val);
21155        }
21156        if matches!(version, MavlinkVersion::V2) {
21157            let len = __tmp.len();
21158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21159        } else {
21160            __tmp.len()
21161        }
21162    }
21163}
21164#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21165#[doc = ""]
21166#[doc = "ID: 252"]
21167#[derive(Debug, Clone, PartialEq)]
21168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21170#[cfg_attr(feature = "ts", derive(TS))]
21171#[cfg_attr(feature = "ts", ts(export))]
21172pub struct NAMED_VALUE_INT_DATA {
21173    #[doc = "Timestamp (time since system boot)."]
21174    pub time_boot_ms: u32,
21175    #[doc = "Signed integer value"]
21176    pub value: i32,
21177    #[doc = "Name of the debug variable"]
21178    #[cfg_attr(feature = "ts", ts(type = "string"))]
21179    pub name: CharArray<10>,
21180}
21181impl NAMED_VALUE_INT_DATA {
21182    pub const ENCODED_LEN: usize = 18usize;
21183    pub const DEFAULT: Self = Self {
21184        time_boot_ms: 0_u32,
21185        value: 0_i32,
21186        name: CharArray::new([0_u8; 10usize]),
21187    };
21188    #[cfg(feature = "arbitrary")]
21189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21190        use arbitrary::{Arbitrary, Unstructured};
21191        let mut buf = [0u8; 1024];
21192        rng.fill_bytes(&mut buf);
21193        let mut unstructured = Unstructured::new(&buf);
21194        Self::arbitrary(&mut unstructured).unwrap_or_default()
21195    }
21196}
21197impl Default for NAMED_VALUE_INT_DATA {
21198    fn default() -> Self {
21199        Self::DEFAULT.clone()
21200    }
21201}
21202impl MessageData for NAMED_VALUE_INT_DATA {
21203    type Message = MavMessage;
21204    const ID: u32 = 252u32;
21205    const NAME: &'static str = "NAMED_VALUE_INT";
21206    const EXTRA_CRC: u8 = 44u8;
21207    const ENCODED_LEN: usize = 18usize;
21208    fn deser(
21209        _version: MavlinkVersion,
21210        __input: &[u8],
21211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21212        let avail_len = __input.len();
21213        let mut payload_buf = [0; Self::ENCODED_LEN];
21214        let mut buf = if avail_len < Self::ENCODED_LEN {
21215            payload_buf[0..avail_len].copy_from_slice(__input);
21216            Bytes::new(&payload_buf)
21217        } else {
21218            Bytes::new(__input)
21219        };
21220        let mut __struct = Self::default();
21221        __struct.time_boot_ms = buf.get_u32_le()?;
21222        __struct.value = buf.get_i32_le()?;
21223        let mut tmp = [0_u8; 10usize];
21224        for v in &mut tmp {
21225            *v = buf.get_u8()?;
21226        }
21227        __struct.name = CharArray::new(tmp);
21228        Ok(__struct)
21229    }
21230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21231        let mut __tmp = BytesMut::new(bytes);
21232        #[allow(clippy::absurd_extreme_comparisons)]
21233        #[allow(unused_comparisons)]
21234        if __tmp.remaining() < Self::ENCODED_LEN {
21235            panic!(
21236                "buffer is too small (need {} bytes, but got {})",
21237                Self::ENCODED_LEN,
21238                __tmp.remaining(),
21239            )
21240        }
21241        __tmp.put_u32_le(self.time_boot_ms);
21242        __tmp.put_i32_le(self.value);
21243        for val in &self.name {
21244            __tmp.put_u8(*val);
21245        }
21246        if matches!(version, MavlinkVersion::V2) {
21247            let len = __tmp.len();
21248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21249        } else {
21250            __tmp.len()
21251        }
21252    }
21253}
21254#[doc = "The state of the navigation and position controller."]
21255#[doc = ""]
21256#[doc = "ID: 62"]
21257#[derive(Debug, Clone, PartialEq)]
21258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21260#[cfg_attr(feature = "ts", derive(TS))]
21261#[cfg_attr(feature = "ts", ts(export))]
21262pub struct NAV_CONTROLLER_OUTPUT_DATA {
21263    #[doc = "Current desired roll"]
21264    pub nav_roll: f32,
21265    #[doc = "Current desired pitch"]
21266    pub nav_pitch: f32,
21267    #[doc = "Current altitude error"]
21268    pub alt_error: f32,
21269    #[doc = "Current airspeed error"]
21270    pub aspd_error: f32,
21271    #[doc = "Current crosstrack error on x-y plane"]
21272    pub xtrack_error: f32,
21273    #[doc = "Current desired heading"]
21274    pub nav_bearing: i16,
21275    #[doc = "Bearing to current waypoint/target"]
21276    pub target_bearing: i16,
21277    #[doc = "Distance to active waypoint"]
21278    pub wp_dist: u16,
21279}
21280impl NAV_CONTROLLER_OUTPUT_DATA {
21281    pub const ENCODED_LEN: usize = 26usize;
21282    pub const DEFAULT: Self = Self {
21283        nav_roll: 0.0_f32,
21284        nav_pitch: 0.0_f32,
21285        alt_error: 0.0_f32,
21286        aspd_error: 0.0_f32,
21287        xtrack_error: 0.0_f32,
21288        nav_bearing: 0_i16,
21289        target_bearing: 0_i16,
21290        wp_dist: 0_u16,
21291    };
21292    #[cfg(feature = "arbitrary")]
21293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21294        use arbitrary::{Arbitrary, Unstructured};
21295        let mut buf = [0u8; 1024];
21296        rng.fill_bytes(&mut buf);
21297        let mut unstructured = Unstructured::new(&buf);
21298        Self::arbitrary(&mut unstructured).unwrap_or_default()
21299    }
21300}
21301impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21302    fn default() -> Self {
21303        Self::DEFAULT.clone()
21304    }
21305}
21306impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21307    type Message = MavMessage;
21308    const ID: u32 = 62u32;
21309    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21310    const EXTRA_CRC: u8 = 183u8;
21311    const ENCODED_LEN: usize = 26usize;
21312    fn deser(
21313        _version: MavlinkVersion,
21314        __input: &[u8],
21315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21316        let avail_len = __input.len();
21317        let mut payload_buf = [0; Self::ENCODED_LEN];
21318        let mut buf = if avail_len < Self::ENCODED_LEN {
21319            payload_buf[0..avail_len].copy_from_slice(__input);
21320            Bytes::new(&payload_buf)
21321        } else {
21322            Bytes::new(__input)
21323        };
21324        let mut __struct = Self::default();
21325        __struct.nav_roll = buf.get_f32_le()?;
21326        __struct.nav_pitch = buf.get_f32_le()?;
21327        __struct.alt_error = buf.get_f32_le()?;
21328        __struct.aspd_error = buf.get_f32_le()?;
21329        __struct.xtrack_error = buf.get_f32_le()?;
21330        __struct.nav_bearing = buf.get_i16_le()?;
21331        __struct.target_bearing = buf.get_i16_le()?;
21332        __struct.wp_dist = buf.get_u16_le()?;
21333        Ok(__struct)
21334    }
21335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21336        let mut __tmp = BytesMut::new(bytes);
21337        #[allow(clippy::absurd_extreme_comparisons)]
21338        #[allow(unused_comparisons)]
21339        if __tmp.remaining() < Self::ENCODED_LEN {
21340            panic!(
21341                "buffer is too small (need {} bytes, but got {})",
21342                Self::ENCODED_LEN,
21343                __tmp.remaining(),
21344            )
21345        }
21346        __tmp.put_f32_le(self.nav_roll);
21347        __tmp.put_f32_le(self.nav_pitch);
21348        __tmp.put_f32_le(self.alt_error);
21349        __tmp.put_f32_le(self.aspd_error);
21350        __tmp.put_f32_le(self.xtrack_error);
21351        __tmp.put_i16_le(self.nav_bearing);
21352        __tmp.put_i16_le(self.target_bearing);
21353        __tmp.put_u16_le(self.wp_dist);
21354        if matches!(version, MavlinkVersion::V2) {
21355            let len = __tmp.len();
21356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21357        } else {
21358            __tmp.len()
21359        }
21360    }
21361}
21362#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21363#[doc = ""]
21364#[doc = "ID: 330"]
21365#[derive(Debug, Clone, PartialEq)]
21366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21368#[cfg_attr(feature = "ts", derive(TS))]
21369#[cfg_attr(feature = "ts", ts(export))]
21370pub struct OBSTACLE_DISTANCE_DATA {
21371    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21372    pub time_usec: u64,
21373    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21374    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21375    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21376    pub distances: [u16; 72],
21377    #[doc = "Minimum distance the sensor can measure."]
21378    pub min_distance: u16,
21379    #[doc = "Maximum distance the sensor can measure."]
21380    pub max_distance: u16,
21381    #[doc = "Class id of the distance sensor type."]
21382    pub sensor_type: MavDistanceSensor,
21383    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21384    pub increment: u8,
21385    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21386    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21387    pub increment_f: f32,
21388    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21390    pub angle_offset: f32,
21391    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21392    #[cfg_attr(feature = "serde", serde(default))]
21393    pub frame: MavFrame,
21394}
21395impl OBSTACLE_DISTANCE_DATA {
21396    pub const ENCODED_LEN: usize = 167usize;
21397    pub const DEFAULT: Self = Self {
21398        time_usec: 0_u64,
21399        distances: [0_u16; 72usize],
21400        min_distance: 0_u16,
21401        max_distance: 0_u16,
21402        sensor_type: MavDistanceSensor::DEFAULT,
21403        increment: 0_u8,
21404        increment_f: 0.0_f32,
21405        angle_offset: 0.0_f32,
21406        frame: MavFrame::DEFAULT,
21407    };
21408    #[cfg(feature = "arbitrary")]
21409    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21410        use arbitrary::{Arbitrary, Unstructured};
21411        let mut buf = [0u8; 1024];
21412        rng.fill_bytes(&mut buf);
21413        let mut unstructured = Unstructured::new(&buf);
21414        Self::arbitrary(&mut unstructured).unwrap_or_default()
21415    }
21416}
21417impl Default for OBSTACLE_DISTANCE_DATA {
21418    fn default() -> Self {
21419        Self::DEFAULT.clone()
21420    }
21421}
21422impl MessageData for OBSTACLE_DISTANCE_DATA {
21423    type Message = MavMessage;
21424    const ID: u32 = 330u32;
21425    const NAME: &'static str = "OBSTACLE_DISTANCE";
21426    const EXTRA_CRC: u8 = 23u8;
21427    const ENCODED_LEN: usize = 167usize;
21428    fn deser(
21429        _version: MavlinkVersion,
21430        __input: &[u8],
21431    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21432        let avail_len = __input.len();
21433        let mut payload_buf = [0; Self::ENCODED_LEN];
21434        let mut buf = if avail_len < Self::ENCODED_LEN {
21435            payload_buf[0..avail_len].copy_from_slice(__input);
21436            Bytes::new(&payload_buf)
21437        } else {
21438            Bytes::new(__input)
21439        };
21440        let mut __struct = Self::default();
21441        __struct.time_usec = buf.get_u64_le()?;
21442        for v in &mut __struct.distances {
21443            let val = buf.get_u16_le()?;
21444            *v = val;
21445        }
21446        __struct.min_distance = buf.get_u16_le()?;
21447        __struct.max_distance = buf.get_u16_le()?;
21448        let tmp = buf.get_u8()?;
21449        __struct.sensor_type =
21450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21451                enum_type: "MavDistanceSensor",
21452                value: tmp as u64,
21453            })?;
21454        __struct.increment = buf.get_u8()?;
21455        __struct.increment_f = buf.get_f32_le()?;
21456        __struct.angle_offset = buf.get_f32_le()?;
21457        let tmp = buf.get_u8()?;
21458        __struct.frame =
21459            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21460                enum_type: "MavFrame",
21461                value: tmp as u64,
21462            })?;
21463        Ok(__struct)
21464    }
21465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21466        let mut __tmp = BytesMut::new(bytes);
21467        #[allow(clippy::absurd_extreme_comparisons)]
21468        #[allow(unused_comparisons)]
21469        if __tmp.remaining() < Self::ENCODED_LEN {
21470            panic!(
21471                "buffer is too small (need {} bytes, but got {})",
21472                Self::ENCODED_LEN,
21473                __tmp.remaining(),
21474            )
21475        }
21476        __tmp.put_u64_le(self.time_usec);
21477        for val in &self.distances {
21478            __tmp.put_u16_le(*val);
21479        }
21480        __tmp.put_u16_le(self.min_distance);
21481        __tmp.put_u16_le(self.max_distance);
21482        __tmp.put_u8(self.sensor_type as u8);
21483        __tmp.put_u8(self.increment);
21484        if matches!(version, MavlinkVersion::V2) {
21485            __tmp.put_f32_le(self.increment_f);
21486            __tmp.put_f32_le(self.angle_offset);
21487            __tmp.put_u8(self.frame as u8);
21488            let len = __tmp.len();
21489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21490        } else {
21491            __tmp.len()
21492        }
21493    }
21494}
21495#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21496#[doc = ""]
21497#[doc = "ID: 331"]
21498#[derive(Debug, Clone, PartialEq)]
21499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21501#[cfg_attr(feature = "ts", derive(TS))]
21502#[cfg_attr(feature = "ts", ts(export))]
21503pub struct ODOMETRY_DATA {
21504    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21505    pub time_usec: u64,
21506    #[doc = "X Position"]
21507    pub x: f32,
21508    #[doc = "Y Position"]
21509    pub y: f32,
21510    #[doc = "Z Position"]
21511    pub z: f32,
21512    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21514    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21515    pub q: [f32; 4],
21516    #[doc = "X linear speed"]
21517    pub vx: f32,
21518    #[doc = "Y linear speed"]
21519    pub vy: f32,
21520    #[doc = "Z linear speed"]
21521    pub vz: f32,
21522    #[doc = "Roll angular speed"]
21523    pub rollspeed: f32,
21524    #[doc = "Pitch angular speed"]
21525    pub pitchspeed: f32,
21526    #[doc = "Yaw angular speed"]
21527    pub yawspeed: f32,
21528    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21529    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21530    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21531    pub pose_covariance: [f32; 21],
21532    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21533    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21534    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21535    pub velocity_covariance: [f32; 21],
21536    #[doc = "Coordinate frame of reference for the pose data."]
21537    pub frame_id: MavFrame,
21538    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21539    pub child_frame_id: MavFrame,
21540    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21542    pub reset_counter: u8,
21543    #[doc = "Type of estimator that is providing the odometry."]
21544    #[cfg_attr(feature = "serde", serde(default))]
21545    pub estimator_type: MavEstimatorType,
21546    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21547    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21548    pub quality: i8,
21549}
21550impl ODOMETRY_DATA {
21551    pub const ENCODED_LEN: usize = 233usize;
21552    pub const DEFAULT: Self = Self {
21553        time_usec: 0_u64,
21554        x: 0.0_f32,
21555        y: 0.0_f32,
21556        z: 0.0_f32,
21557        q: [0.0_f32; 4usize],
21558        vx: 0.0_f32,
21559        vy: 0.0_f32,
21560        vz: 0.0_f32,
21561        rollspeed: 0.0_f32,
21562        pitchspeed: 0.0_f32,
21563        yawspeed: 0.0_f32,
21564        pose_covariance: [0.0_f32; 21usize],
21565        velocity_covariance: [0.0_f32; 21usize],
21566        frame_id: MavFrame::DEFAULT,
21567        child_frame_id: MavFrame::DEFAULT,
21568        reset_counter: 0_u8,
21569        estimator_type: MavEstimatorType::DEFAULT,
21570        quality: 0_i8,
21571    };
21572    #[cfg(feature = "arbitrary")]
21573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21574        use arbitrary::{Arbitrary, Unstructured};
21575        let mut buf = [0u8; 1024];
21576        rng.fill_bytes(&mut buf);
21577        let mut unstructured = Unstructured::new(&buf);
21578        Self::arbitrary(&mut unstructured).unwrap_or_default()
21579    }
21580}
21581impl Default for ODOMETRY_DATA {
21582    fn default() -> Self {
21583        Self::DEFAULT.clone()
21584    }
21585}
21586impl MessageData for ODOMETRY_DATA {
21587    type Message = MavMessage;
21588    const ID: u32 = 331u32;
21589    const NAME: &'static str = "ODOMETRY";
21590    const EXTRA_CRC: u8 = 91u8;
21591    const ENCODED_LEN: usize = 233usize;
21592    fn deser(
21593        _version: MavlinkVersion,
21594        __input: &[u8],
21595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21596        let avail_len = __input.len();
21597        let mut payload_buf = [0; Self::ENCODED_LEN];
21598        let mut buf = if avail_len < Self::ENCODED_LEN {
21599            payload_buf[0..avail_len].copy_from_slice(__input);
21600            Bytes::new(&payload_buf)
21601        } else {
21602            Bytes::new(__input)
21603        };
21604        let mut __struct = Self::default();
21605        __struct.time_usec = buf.get_u64_le()?;
21606        __struct.x = buf.get_f32_le()?;
21607        __struct.y = buf.get_f32_le()?;
21608        __struct.z = buf.get_f32_le()?;
21609        for v in &mut __struct.q {
21610            let val = buf.get_f32_le()?;
21611            *v = val;
21612        }
21613        __struct.vx = buf.get_f32_le()?;
21614        __struct.vy = buf.get_f32_le()?;
21615        __struct.vz = buf.get_f32_le()?;
21616        __struct.rollspeed = buf.get_f32_le()?;
21617        __struct.pitchspeed = buf.get_f32_le()?;
21618        __struct.yawspeed = buf.get_f32_le()?;
21619        for v in &mut __struct.pose_covariance {
21620            let val = buf.get_f32_le()?;
21621            *v = val;
21622        }
21623        for v in &mut __struct.velocity_covariance {
21624            let val = buf.get_f32_le()?;
21625            *v = val;
21626        }
21627        let tmp = buf.get_u8()?;
21628        __struct.frame_id =
21629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21630                enum_type: "MavFrame",
21631                value: tmp as u64,
21632            })?;
21633        let tmp = buf.get_u8()?;
21634        __struct.child_frame_id =
21635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21636                enum_type: "MavFrame",
21637                value: tmp as u64,
21638            })?;
21639        __struct.reset_counter = buf.get_u8()?;
21640        let tmp = buf.get_u8()?;
21641        __struct.estimator_type =
21642            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21643                enum_type: "MavEstimatorType",
21644                value: tmp as u64,
21645            })?;
21646        __struct.quality = buf.get_i8()?;
21647        Ok(__struct)
21648    }
21649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21650        let mut __tmp = BytesMut::new(bytes);
21651        #[allow(clippy::absurd_extreme_comparisons)]
21652        #[allow(unused_comparisons)]
21653        if __tmp.remaining() < Self::ENCODED_LEN {
21654            panic!(
21655                "buffer is too small (need {} bytes, but got {})",
21656                Self::ENCODED_LEN,
21657                __tmp.remaining(),
21658            )
21659        }
21660        __tmp.put_u64_le(self.time_usec);
21661        __tmp.put_f32_le(self.x);
21662        __tmp.put_f32_le(self.y);
21663        __tmp.put_f32_le(self.z);
21664        for val in &self.q {
21665            __tmp.put_f32_le(*val);
21666        }
21667        __tmp.put_f32_le(self.vx);
21668        __tmp.put_f32_le(self.vy);
21669        __tmp.put_f32_le(self.vz);
21670        __tmp.put_f32_le(self.rollspeed);
21671        __tmp.put_f32_le(self.pitchspeed);
21672        __tmp.put_f32_le(self.yawspeed);
21673        for val in &self.pose_covariance {
21674            __tmp.put_f32_le(*val);
21675        }
21676        for val in &self.velocity_covariance {
21677            __tmp.put_f32_le(*val);
21678        }
21679        __tmp.put_u8(self.frame_id as u8);
21680        __tmp.put_u8(self.child_frame_id as u8);
21681        if matches!(version, MavlinkVersion::V2) {
21682            __tmp.put_u8(self.reset_counter);
21683            __tmp.put_u8(self.estimator_type as u8);
21684            __tmp.put_i8(self.quality);
21685            let len = __tmp.len();
21686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21687        } else {
21688            __tmp.len()
21689        }
21690    }
21691}
21692#[doc = "Hardware status sent by an onboard computer."]
21693#[doc = ""]
21694#[doc = "ID: 390"]
21695#[derive(Debug, Clone, PartialEq)]
21696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21698#[cfg_attr(feature = "ts", derive(TS))]
21699#[cfg_attr(feature = "ts", ts(export))]
21700pub struct ONBOARD_COMPUTER_STATUS_DATA {
21701    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21702    pub time_usec: u64,
21703    #[doc = "Time since system boot."]
21704    pub uptime: u32,
21705    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21706    pub ram_usage: u32,
21707    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21708    pub ram_total: u32,
21709    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21710    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21711    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21712    pub storage_type: [u32; 4],
21713    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21714    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21715    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21716    pub storage_usage: [u32; 4],
21717    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21719    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21720    pub storage_total: [u32; 4],
21721    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21722    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21723    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21724    pub link_type: [u32; 6],
21725    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21727    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21728    pub link_tx_rate: [u32; 6],
21729    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21732    pub link_rx_rate: [u32; 6],
21733    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21735    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21736    pub link_tx_max: [u32; 6],
21737    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21739    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21740    pub link_rx_max: [u32; 6],
21741    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21742    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21743    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21744    pub fan_speed: [i16; 4],
21745    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21746    pub mavtype: u8,
21747    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21748    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21749    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21750    pub cpu_cores: [u8; 8],
21751    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21752    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21753    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21754    pub cpu_combined: [u8; 10],
21755    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21756    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21757    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21758    pub gpu_cores: [u8; 4],
21759    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21761    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21762    pub gpu_combined: [u8; 10],
21763    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21764    pub temperature_board: i8,
21765    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21768    pub temperature_core: [i8; 8],
21769}
21770impl ONBOARD_COMPUTER_STATUS_DATA {
21771    pub const ENCODED_LEN: usize = 238usize;
21772    pub const DEFAULT: Self = Self {
21773        time_usec: 0_u64,
21774        uptime: 0_u32,
21775        ram_usage: 0_u32,
21776        ram_total: 0_u32,
21777        storage_type: [0_u32; 4usize],
21778        storage_usage: [0_u32; 4usize],
21779        storage_total: [0_u32; 4usize],
21780        link_type: [0_u32; 6usize],
21781        link_tx_rate: [0_u32; 6usize],
21782        link_rx_rate: [0_u32; 6usize],
21783        link_tx_max: [0_u32; 6usize],
21784        link_rx_max: [0_u32; 6usize],
21785        fan_speed: [0_i16; 4usize],
21786        mavtype: 0_u8,
21787        cpu_cores: [0_u8; 8usize],
21788        cpu_combined: [0_u8; 10usize],
21789        gpu_cores: [0_u8; 4usize],
21790        gpu_combined: [0_u8; 10usize],
21791        temperature_board: 0_i8,
21792        temperature_core: [0_i8; 8usize],
21793    };
21794    #[cfg(feature = "arbitrary")]
21795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21796        use arbitrary::{Arbitrary, Unstructured};
21797        let mut buf = [0u8; 1024];
21798        rng.fill_bytes(&mut buf);
21799        let mut unstructured = Unstructured::new(&buf);
21800        Self::arbitrary(&mut unstructured).unwrap_or_default()
21801    }
21802}
21803impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21804    fn default() -> Self {
21805        Self::DEFAULT.clone()
21806    }
21807}
21808impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21809    type Message = MavMessage;
21810    const ID: u32 = 390u32;
21811    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21812    const EXTRA_CRC: u8 = 156u8;
21813    const ENCODED_LEN: usize = 238usize;
21814    fn deser(
21815        _version: MavlinkVersion,
21816        __input: &[u8],
21817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21818        let avail_len = __input.len();
21819        let mut payload_buf = [0; Self::ENCODED_LEN];
21820        let mut buf = if avail_len < Self::ENCODED_LEN {
21821            payload_buf[0..avail_len].copy_from_slice(__input);
21822            Bytes::new(&payload_buf)
21823        } else {
21824            Bytes::new(__input)
21825        };
21826        let mut __struct = Self::default();
21827        __struct.time_usec = buf.get_u64_le()?;
21828        __struct.uptime = buf.get_u32_le()?;
21829        __struct.ram_usage = buf.get_u32_le()?;
21830        __struct.ram_total = buf.get_u32_le()?;
21831        for v in &mut __struct.storage_type {
21832            let val = buf.get_u32_le()?;
21833            *v = val;
21834        }
21835        for v in &mut __struct.storage_usage {
21836            let val = buf.get_u32_le()?;
21837            *v = val;
21838        }
21839        for v in &mut __struct.storage_total {
21840            let val = buf.get_u32_le()?;
21841            *v = val;
21842        }
21843        for v in &mut __struct.link_type {
21844            let val = buf.get_u32_le()?;
21845            *v = val;
21846        }
21847        for v in &mut __struct.link_tx_rate {
21848            let val = buf.get_u32_le()?;
21849            *v = val;
21850        }
21851        for v in &mut __struct.link_rx_rate {
21852            let val = buf.get_u32_le()?;
21853            *v = val;
21854        }
21855        for v in &mut __struct.link_tx_max {
21856            let val = buf.get_u32_le()?;
21857            *v = val;
21858        }
21859        for v in &mut __struct.link_rx_max {
21860            let val = buf.get_u32_le()?;
21861            *v = val;
21862        }
21863        for v in &mut __struct.fan_speed {
21864            let val = buf.get_i16_le()?;
21865            *v = val;
21866        }
21867        __struct.mavtype = buf.get_u8()?;
21868        for v in &mut __struct.cpu_cores {
21869            let val = buf.get_u8()?;
21870            *v = val;
21871        }
21872        for v in &mut __struct.cpu_combined {
21873            let val = buf.get_u8()?;
21874            *v = val;
21875        }
21876        for v in &mut __struct.gpu_cores {
21877            let val = buf.get_u8()?;
21878            *v = val;
21879        }
21880        for v in &mut __struct.gpu_combined {
21881            let val = buf.get_u8()?;
21882            *v = val;
21883        }
21884        __struct.temperature_board = buf.get_i8()?;
21885        for v in &mut __struct.temperature_core {
21886            let val = buf.get_i8()?;
21887            *v = val;
21888        }
21889        Ok(__struct)
21890    }
21891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21892        let mut __tmp = BytesMut::new(bytes);
21893        #[allow(clippy::absurd_extreme_comparisons)]
21894        #[allow(unused_comparisons)]
21895        if __tmp.remaining() < Self::ENCODED_LEN {
21896            panic!(
21897                "buffer is too small (need {} bytes, but got {})",
21898                Self::ENCODED_LEN,
21899                __tmp.remaining(),
21900            )
21901        }
21902        __tmp.put_u64_le(self.time_usec);
21903        __tmp.put_u32_le(self.uptime);
21904        __tmp.put_u32_le(self.ram_usage);
21905        __tmp.put_u32_le(self.ram_total);
21906        for val in &self.storage_type {
21907            __tmp.put_u32_le(*val);
21908        }
21909        for val in &self.storage_usage {
21910            __tmp.put_u32_le(*val);
21911        }
21912        for val in &self.storage_total {
21913            __tmp.put_u32_le(*val);
21914        }
21915        for val in &self.link_type {
21916            __tmp.put_u32_le(*val);
21917        }
21918        for val in &self.link_tx_rate {
21919            __tmp.put_u32_le(*val);
21920        }
21921        for val in &self.link_rx_rate {
21922            __tmp.put_u32_le(*val);
21923        }
21924        for val in &self.link_tx_max {
21925            __tmp.put_u32_le(*val);
21926        }
21927        for val in &self.link_rx_max {
21928            __tmp.put_u32_le(*val);
21929        }
21930        for val in &self.fan_speed {
21931            __tmp.put_i16_le(*val);
21932        }
21933        __tmp.put_u8(self.mavtype);
21934        for val in &self.cpu_cores {
21935            __tmp.put_u8(*val);
21936        }
21937        for val in &self.cpu_combined {
21938            __tmp.put_u8(*val);
21939        }
21940        for val in &self.gpu_cores {
21941            __tmp.put_u8(*val);
21942        }
21943        for val in &self.gpu_combined {
21944            __tmp.put_u8(*val);
21945        }
21946        __tmp.put_i8(self.temperature_board);
21947        for val in &self.temperature_core {
21948            __tmp.put_i8(*val);
21949        }
21950        if matches!(version, MavlinkVersion::V2) {
21951            let len = __tmp.len();
21952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21953        } else {
21954            __tmp.len()
21955        }
21956    }
21957}
21958#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21959#[doc = ""]
21960#[doc = "ID: 12918"]
21961#[derive(Debug, Clone, PartialEq)]
21962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21964#[cfg_attr(feature = "ts", derive(TS))]
21965#[cfg_attr(feature = "ts", ts(export))]
21966pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21967    #[doc = "Status level indicating if arming is allowed."]
21968    pub status: MavOdidArmStatus,
21969    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21970    #[cfg_attr(feature = "ts", ts(type = "string"))]
21971    pub error: CharArray<50>,
21972}
21973impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21974    pub const ENCODED_LEN: usize = 51usize;
21975    pub const DEFAULT: Self = Self {
21976        status: MavOdidArmStatus::DEFAULT,
21977        error: CharArray::new([0_u8; 50usize]),
21978    };
21979    #[cfg(feature = "arbitrary")]
21980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21981        use arbitrary::{Arbitrary, Unstructured};
21982        let mut buf = [0u8; 1024];
21983        rng.fill_bytes(&mut buf);
21984        let mut unstructured = Unstructured::new(&buf);
21985        Self::arbitrary(&mut unstructured).unwrap_or_default()
21986    }
21987}
21988impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21989    fn default() -> Self {
21990        Self::DEFAULT.clone()
21991    }
21992}
21993impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21994    type Message = MavMessage;
21995    const ID: u32 = 12918u32;
21996    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21997    const EXTRA_CRC: u8 = 139u8;
21998    const ENCODED_LEN: usize = 51usize;
21999    fn deser(
22000        _version: MavlinkVersion,
22001        __input: &[u8],
22002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22003        let avail_len = __input.len();
22004        let mut payload_buf = [0; Self::ENCODED_LEN];
22005        let mut buf = if avail_len < Self::ENCODED_LEN {
22006            payload_buf[0..avail_len].copy_from_slice(__input);
22007            Bytes::new(&payload_buf)
22008        } else {
22009            Bytes::new(__input)
22010        };
22011        let mut __struct = Self::default();
22012        let tmp = buf.get_u8()?;
22013        __struct.status =
22014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22015                enum_type: "MavOdidArmStatus",
22016                value: tmp as u64,
22017            })?;
22018        let mut tmp = [0_u8; 50usize];
22019        for v in &mut tmp {
22020            *v = buf.get_u8()?;
22021        }
22022        __struct.error = CharArray::new(tmp);
22023        Ok(__struct)
22024    }
22025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22026        let mut __tmp = BytesMut::new(bytes);
22027        #[allow(clippy::absurd_extreme_comparisons)]
22028        #[allow(unused_comparisons)]
22029        if __tmp.remaining() < Self::ENCODED_LEN {
22030            panic!(
22031                "buffer is too small (need {} bytes, but got {})",
22032                Self::ENCODED_LEN,
22033                __tmp.remaining(),
22034            )
22035        }
22036        __tmp.put_u8(self.status as u8);
22037        for val in &self.error {
22038            __tmp.put_u8(*val);
22039        }
22040        if matches!(version, MavlinkVersion::V2) {
22041            let len = __tmp.len();
22042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22043        } else {
22044            __tmp.len()
22045        }
22046    }
22047}
22048#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22049#[doc = ""]
22050#[doc = "ID: 12902"]
22051#[derive(Debug, Clone, PartialEq)]
22052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22054#[cfg_attr(feature = "ts", derive(TS))]
22055#[cfg_attr(feature = "ts", ts(export))]
22056pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22057    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22058    pub timestamp: u32,
22059    #[doc = "System ID (0 for broadcast)."]
22060    pub target_system: u8,
22061    #[doc = "Component ID (0 for broadcast)."]
22062    pub target_component: u8,
22063    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22066    pub id_or_mac: [u8; 20],
22067    #[doc = "Indicates the type of authentication."]
22068    pub authentication_type: MavOdidAuthType,
22069    #[doc = "Allowed range is 0 - 15."]
22070    pub data_page: u8,
22071    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22072    pub last_page_index: u8,
22073    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22074    pub length: u8,
22075    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22076    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22077    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22078    pub authentication_data: [u8; 23],
22079}
22080impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22081    pub const ENCODED_LEN: usize = 53usize;
22082    pub const DEFAULT: Self = Self {
22083        timestamp: 0_u32,
22084        target_system: 0_u8,
22085        target_component: 0_u8,
22086        id_or_mac: [0_u8; 20usize],
22087        authentication_type: MavOdidAuthType::DEFAULT,
22088        data_page: 0_u8,
22089        last_page_index: 0_u8,
22090        length: 0_u8,
22091        authentication_data: [0_u8; 23usize],
22092    };
22093    #[cfg(feature = "arbitrary")]
22094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22095        use arbitrary::{Arbitrary, Unstructured};
22096        let mut buf = [0u8; 1024];
22097        rng.fill_bytes(&mut buf);
22098        let mut unstructured = Unstructured::new(&buf);
22099        Self::arbitrary(&mut unstructured).unwrap_or_default()
22100    }
22101}
22102impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22103    fn default() -> Self {
22104        Self::DEFAULT.clone()
22105    }
22106}
22107impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22108    type Message = MavMessage;
22109    const ID: u32 = 12902u32;
22110    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22111    const EXTRA_CRC: u8 = 140u8;
22112    const ENCODED_LEN: usize = 53usize;
22113    fn deser(
22114        _version: MavlinkVersion,
22115        __input: &[u8],
22116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22117        let avail_len = __input.len();
22118        let mut payload_buf = [0; Self::ENCODED_LEN];
22119        let mut buf = if avail_len < Self::ENCODED_LEN {
22120            payload_buf[0..avail_len].copy_from_slice(__input);
22121            Bytes::new(&payload_buf)
22122        } else {
22123            Bytes::new(__input)
22124        };
22125        let mut __struct = Self::default();
22126        __struct.timestamp = buf.get_u32_le()?;
22127        __struct.target_system = buf.get_u8()?;
22128        __struct.target_component = buf.get_u8()?;
22129        for v in &mut __struct.id_or_mac {
22130            let val = buf.get_u8()?;
22131            *v = val;
22132        }
22133        let tmp = buf.get_u8()?;
22134        __struct.authentication_type =
22135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22136                enum_type: "MavOdidAuthType",
22137                value: tmp as u64,
22138            })?;
22139        __struct.data_page = buf.get_u8()?;
22140        __struct.last_page_index = buf.get_u8()?;
22141        __struct.length = buf.get_u8()?;
22142        for v in &mut __struct.authentication_data {
22143            let val = buf.get_u8()?;
22144            *v = val;
22145        }
22146        Ok(__struct)
22147    }
22148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22149        let mut __tmp = BytesMut::new(bytes);
22150        #[allow(clippy::absurd_extreme_comparisons)]
22151        #[allow(unused_comparisons)]
22152        if __tmp.remaining() < Self::ENCODED_LEN {
22153            panic!(
22154                "buffer is too small (need {} bytes, but got {})",
22155                Self::ENCODED_LEN,
22156                __tmp.remaining(),
22157            )
22158        }
22159        __tmp.put_u32_le(self.timestamp);
22160        __tmp.put_u8(self.target_system);
22161        __tmp.put_u8(self.target_component);
22162        for val in &self.id_or_mac {
22163            __tmp.put_u8(*val);
22164        }
22165        __tmp.put_u8(self.authentication_type as u8);
22166        __tmp.put_u8(self.data_page);
22167        __tmp.put_u8(self.last_page_index);
22168        __tmp.put_u8(self.length);
22169        for val in &self.authentication_data {
22170            __tmp.put_u8(*val);
22171        }
22172        if matches!(version, MavlinkVersion::V2) {
22173            let len = __tmp.len();
22174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22175        } else {
22176            __tmp.len()
22177        }
22178    }
22179}
22180#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22181#[doc = ""]
22182#[doc = "ID: 12900"]
22183#[derive(Debug, Clone, PartialEq)]
22184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22186#[cfg_attr(feature = "ts", derive(TS))]
22187#[cfg_attr(feature = "ts", ts(export))]
22188pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22189    #[doc = "System ID (0 for broadcast)."]
22190    pub target_system: u8,
22191    #[doc = "Component ID (0 for broadcast)."]
22192    pub target_component: u8,
22193    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22194    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22195    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22196    pub id_or_mac: [u8; 20],
22197    #[doc = "Indicates the format for the uas_id field of this message."]
22198    pub id_type: MavOdidIdType,
22199    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22200    pub ua_type: MavOdidUaType,
22201    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22202    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22203    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22204    pub uas_id: [u8; 20],
22205}
22206impl OPEN_DRONE_ID_BASIC_ID_DATA {
22207    pub const ENCODED_LEN: usize = 44usize;
22208    pub const DEFAULT: Self = Self {
22209        target_system: 0_u8,
22210        target_component: 0_u8,
22211        id_or_mac: [0_u8; 20usize],
22212        id_type: MavOdidIdType::DEFAULT,
22213        ua_type: MavOdidUaType::DEFAULT,
22214        uas_id: [0_u8; 20usize],
22215    };
22216    #[cfg(feature = "arbitrary")]
22217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22218        use arbitrary::{Arbitrary, Unstructured};
22219        let mut buf = [0u8; 1024];
22220        rng.fill_bytes(&mut buf);
22221        let mut unstructured = Unstructured::new(&buf);
22222        Self::arbitrary(&mut unstructured).unwrap_or_default()
22223    }
22224}
22225impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22226    fn default() -> Self {
22227        Self::DEFAULT.clone()
22228    }
22229}
22230impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22231    type Message = MavMessage;
22232    const ID: u32 = 12900u32;
22233    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22234    const EXTRA_CRC: u8 = 114u8;
22235    const ENCODED_LEN: usize = 44usize;
22236    fn deser(
22237        _version: MavlinkVersion,
22238        __input: &[u8],
22239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22240        let avail_len = __input.len();
22241        let mut payload_buf = [0; Self::ENCODED_LEN];
22242        let mut buf = if avail_len < Self::ENCODED_LEN {
22243            payload_buf[0..avail_len].copy_from_slice(__input);
22244            Bytes::new(&payload_buf)
22245        } else {
22246            Bytes::new(__input)
22247        };
22248        let mut __struct = Self::default();
22249        __struct.target_system = buf.get_u8()?;
22250        __struct.target_component = buf.get_u8()?;
22251        for v in &mut __struct.id_or_mac {
22252            let val = buf.get_u8()?;
22253            *v = val;
22254        }
22255        let tmp = buf.get_u8()?;
22256        __struct.id_type =
22257            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22258                enum_type: "MavOdidIdType",
22259                value: tmp as u64,
22260            })?;
22261        let tmp = buf.get_u8()?;
22262        __struct.ua_type =
22263            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22264                enum_type: "MavOdidUaType",
22265                value: tmp as u64,
22266            })?;
22267        for v in &mut __struct.uas_id {
22268            let val = buf.get_u8()?;
22269            *v = val;
22270        }
22271        Ok(__struct)
22272    }
22273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22274        let mut __tmp = BytesMut::new(bytes);
22275        #[allow(clippy::absurd_extreme_comparisons)]
22276        #[allow(unused_comparisons)]
22277        if __tmp.remaining() < Self::ENCODED_LEN {
22278            panic!(
22279                "buffer is too small (need {} bytes, but got {})",
22280                Self::ENCODED_LEN,
22281                __tmp.remaining(),
22282            )
22283        }
22284        __tmp.put_u8(self.target_system);
22285        __tmp.put_u8(self.target_component);
22286        for val in &self.id_or_mac {
22287            __tmp.put_u8(*val);
22288        }
22289        __tmp.put_u8(self.id_type as u8);
22290        __tmp.put_u8(self.ua_type as u8);
22291        for val in &self.uas_id {
22292            __tmp.put_u8(*val);
22293        }
22294        if matches!(version, MavlinkVersion::V2) {
22295            let len = __tmp.len();
22296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22297        } else {
22298            __tmp.len()
22299        }
22300    }
22301}
22302#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22303#[doc = ""]
22304#[doc = "ID: 12901"]
22305#[derive(Debug, Clone, PartialEq)]
22306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22308#[cfg_attr(feature = "ts", derive(TS))]
22309#[cfg_attr(feature = "ts", ts(export))]
22310pub struct OPEN_DRONE_ID_LOCATION_DATA {
22311    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22312    pub latitude: i32,
22313    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22314    pub longitude: i32,
22315    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22316    pub altitude_barometric: f32,
22317    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22318    pub altitude_geodetic: f32,
22319    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22320    pub height: f32,
22321    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22322    pub timestamp: f32,
22323    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22324    pub direction: u16,
22325    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22326    pub speed_horizontal: u16,
22327    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22328    pub speed_vertical: i16,
22329    #[doc = "System ID (0 for broadcast)."]
22330    pub target_system: u8,
22331    #[doc = "Component ID (0 for broadcast)."]
22332    pub target_component: u8,
22333    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22335    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22336    pub id_or_mac: [u8; 20],
22337    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22338    pub status: MavOdidStatus,
22339    #[doc = "Indicates the reference point for the height field."]
22340    pub height_reference: MavOdidHeightRef,
22341    #[doc = "The accuracy of the horizontal position."]
22342    pub horizontal_accuracy: MavOdidHorAcc,
22343    #[doc = "The accuracy of the vertical position."]
22344    pub vertical_accuracy: MavOdidVerAcc,
22345    #[doc = "The accuracy of the barometric altitude."]
22346    pub barometer_accuracy: MavOdidVerAcc,
22347    #[doc = "The accuracy of the horizontal and vertical speed."]
22348    pub speed_accuracy: MavOdidSpeedAcc,
22349    #[doc = "The accuracy of the timestamps."]
22350    pub timestamp_accuracy: MavOdidTimeAcc,
22351}
22352impl OPEN_DRONE_ID_LOCATION_DATA {
22353    pub const ENCODED_LEN: usize = 59usize;
22354    pub const DEFAULT: Self = Self {
22355        latitude: 0_i32,
22356        longitude: 0_i32,
22357        altitude_barometric: 0.0_f32,
22358        altitude_geodetic: 0.0_f32,
22359        height: 0.0_f32,
22360        timestamp: 0.0_f32,
22361        direction: 0_u16,
22362        speed_horizontal: 0_u16,
22363        speed_vertical: 0_i16,
22364        target_system: 0_u8,
22365        target_component: 0_u8,
22366        id_or_mac: [0_u8; 20usize],
22367        status: MavOdidStatus::DEFAULT,
22368        height_reference: MavOdidHeightRef::DEFAULT,
22369        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22370        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22371        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22372        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22373        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22374    };
22375    #[cfg(feature = "arbitrary")]
22376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22377        use arbitrary::{Arbitrary, Unstructured};
22378        let mut buf = [0u8; 1024];
22379        rng.fill_bytes(&mut buf);
22380        let mut unstructured = Unstructured::new(&buf);
22381        Self::arbitrary(&mut unstructured).unwrap_or_default()
22382    }
22383}
22384impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22385    fn default() -> Self {
22386        Self::DEFAULT.clone()
22387    }
22388}
22389impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22390    type Message = MavMessage;
22391    const ID: u32 = 12901u32;
22392    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22393    const EXTRA_CRC: u8 = 254u8;
22394    const ENCODED_LEN: usize = 59usize;
22395    fn deser(
22396        _version: MavlinkVersion,
22397        __input: &[u8],
22398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22399        let avail_len = __input.len();
22400        let mut payload_buf = [0; Self::ENCODED_LEN];
22401        let mut buf = if avail_len < Self::ENCODED_LEN {
22402            payload_buf[0..avail_len].copy_from_slice(__input);
22403            Bytes::new(&payload_buf)
22404        } else {
22405            Bytes::new(__input)
22406        };
22407        let mut __struct = Self::default();
22408        __struct.latitude = buf.get_i32_le()?;
22409        __struct.longitude = buf.get_i32_le()?;
22410        __struct.altitude_barometric = buf.get_f32_le()?;
22411        __struct.altitude_geodetic = buf.get_f32_le()?;
22412        __struct.height = buf.get_f32_le()?;
22413        __struct.timestamp = buf.get_f32_le()?;
22414        __struct.direction = buf.get_u16_le()?;
22415        __struct.speed_horizontal = buf.get_u16_le()?;
22416        __struct.speed_vertical = buf.get_i16_le()?;
22417        __struct.target_system = buf.get_u8()?;
22418        __struct.target_component = buf.get_u8()?;
22419        for v in &mut __struct.id_or_mac {
22420            let val = buf.get_u8()?;
22421            *v = val;
22422        }
22423        let tmp = buf.get_u8()?;
22424        __struct.status =
22425            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22426                enum_type: "MavOdidStatus",
22427                value: tmp as u64,
22428            })?;
22429        let tmp = buf.get_u8()?;
22430        __struct.height_reference =
22431            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22432                enum_type: "MavOdidHeightRef",
22433                value: tmp as u64,
22434            })?;
22435        let tmp = buf.get_u8()?;
22436        __struct.horizontal_accuracy =
22437            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22438                enum_type: "MavOdidHorAcc",
22439                value: tmp as u64,
22440            })?;
22441        let tmp = buf.get_u8()?;
22442        __struct.vertical_accuracy =
22443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22444                enum_type: "MavOdidVerAcc",
22445                value: tmp as u64,
22446            })?;
22447        let tmp = buf.get_u8()?;
22448        __struct.barometer_accuracy =
22449            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22450                enum_type: "MavOdidVerAcc",
22451                value: tmp as u64,
22452            })?;
22453        let tmp = buf.get_u8()?;
22454        __struct.speed_accuracy =
22455            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22456                enum_type: "MavOdidSpeedAcc",
22457                value: tmp as u64,
22458            })?;
22459        let tmp = buf.get_u8()?;
22460        __struct.timestamp_accuracy =
22461            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22462                enum_type: "MavOdidTimeAcc",
22463                value: tmp as u64,
22464            })?;
22465        Ok(__struct)
22466    }
22467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22468        let mut __tmp = BytesMut::new(bytes);
22469        #[allow(clippy::absurd_extreme_comparisons)]
22470        #[allow(unused_comparisons)]
22471        if __tmp.remaining() < Self::ENCODED_LEN {
22472            panic!(
22473                "buffer is too small (need {} bytes, but got {})",
22474                Self::ENCODED_LEN,
22475                __tmp.remaining(),
22476            )
22477        }
22478        __tmp.put_i32_le(self.latitude);
22479        __tmp.put_i32_le(self.longitude);
22480        __tmp.put_f32_le(self.altitude_barometric);
22481        __tmp.put_f32_le(self.altitude_geodetic);
22482        __tmp.put_f32_le(self.height);
22483        __tmp.put_f32_le(self.timestamp);
22484        __tmp.put_u16_le(self.direction);
22485        __tmp.put_u16_le(self.speed_horizontal);
22486        __tmp.put_i16_le(self.speed_vertical);
22487        __tmp.put_u8(self.target_system);
22488        __tmp.put_u8(self.target_component);
22489        for val in &self.id_or_mac {
22490            __tmp.put_u8(*val);
22491        }
22492        __tmp.put_u8(self.status as u8);
22493        __tmp.put_u8(self.height_reference as u8);
22494        __tmp.put_u8(self.horizontal_accuracy as u8);
22495        __tmp.put_u8(self.vertical_accuracy as u8);
22496        __tmp.put_u8(self.barometer_accuracy as u8);
22497        __tmp.put_u8(self.speed_accuracy as u8);
22498        __tmp.put_u8(self.timestamp_accuracy as u8);
22499        if matches!(version, MavlinkVersion::V2) {
22500            let len = __tmp.len();
22501            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22502        } else {
22503            __tmp.len()
22504        }
22505    }
22506}
22507#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22508#[doc = ""]
22509#[doc = "ID: 12915"]
22510#[derive(Debug, Clone, PartialEq)]
22511#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22513#[cfg_attr(feature = "ts", derive(TS))]
22514#[cfg_attr(feature = "ts", ts(export))]
22515pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22516    #[doc = "System ID (0 for broadcast)."]
22517    pub target_system: u8,
22518    #[doc = "Component ID (0 for broadcast)."]
22519    pub target_component: u8,
22520    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22521    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22522    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22523    pub id_or_mac: [u8; 20],
22524    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22525    pub single_message_size: u8,
22526    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22527    pub msg_pack_size: u8,
22528    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22529    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22530    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22531    pub messages: [u8; 225],
22532}
22533impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22534    pub const ENCODED_LEN: usize = 249usize;
22535    pub const DEFAULT: Self = Self {
22536        target_system: 0_u8,
22537        target_component: 0_u8,
22538        id_or_mac: [0_u8; 20usize],
22539        single_message_size: 0_u8,
22540        msg_pack_size: 0_u8,
22541        messages: [0_u8; 225usize],
22542    };
22543    #[cfg(feature = "arbitrary")]
22544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22545        use arbitrary::{Arbitrary, Unstructured};
22546        let mut buf = [0u8; 1024];
22547        rng.fill_bytes(&mut buf);
22548        let mut unstructured = Unstructured::new(&buf);
22549        Self::arbitrary(&mut unstructured).unwrap_or_default()
22550    }
22551}
22552impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22553    fn default() -> Self {
22554        Self::DEFAULT.clone()
22555    }
22556}
22557impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22558    type Message = MavMessage;
22559    const ID: u32 = 12915u32;
22560    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22561    const EXTRA_CRC: u8 = 94u8;
22562    const ENCODED_LEN: usize = 249usize;
22563    fn deser(
22564        _version: MavlinkVersion,
22565        __input: &[u8],
22566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22567        let avail_len = __input.len();
22568        let mut payload_buf = [0; Self::ENCODED_LEN];
22569        let mut buf = if avail_len < Self::ENCODED_LEN {
22570            payload_buf[0..avail_len].copy_from_slice(__input);
22571            Bytes::new(&payload_buf)
22572        } else {
22573            Bytes::new(__input)
22574        };
22575        let mut __struct = Self::default();
22576        __struct.target_system = buf.get_u8()?;
22577        __struct.target_component = buf.get_u8()?;
22578        for v in &mut __struct.id_or_mac {
22579            let val = buf.get_u8()?;
22580            *v = val;
22581        }
22582        __struct.single_message_size = buf.get_u8()?;
22583        __struct.msg_pack_size = buf.get_u8()?;
22584        for v in &mut __struct.messages {
22585            let val = buf.get_u8()?;
22586            *v = val;
22587        }
22588        Ok(__struct)
22589    }
22590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22591        let mut __tmp = BytesMut::new(bytes);
22592        #[allow(clippy::absurd_extreme_comparisons)]
22593        #[allow(unused_comparisons)]
22594        if __tmp.remaining() < Self::ENCODED_LEN {
22595            panic!(
22596                "buffer is too small (need {} bytes, but got {})",
22597                Self::ENCODED_LEN,
22598                __tmp.remaining(),
22599            )
22600        }
22601        __tmp.put_u8(self.target_system);
22602        __tmp.put_u8(self.target_component);
22603        for val in &self.id_or_mac {
22604            __tmp.put_u8(*val);
22605        }
22606        __tmp.put_u8(self.single_message_size);
22607        __tmp.put_u8(self.msg_pack_size);
22608        for val in &self.messages {
22609            __tmp.put_u8(*val);
22610        }
22611        if matches!(version, MavlinkVersion::V2) {
22612            let len = __tmp.len();
22613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22614        } else {
22615            __tmp.len()
22616        }
22617    }
22618}
22619#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22620#[doc = ""]
22621#[doc = "ID: 12905"]
22622#[derive(Debug, Clone, PartialEq)]
22623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22625#[cfg_attr(feature = "ts", derive(TS))]
22626#[cfg_attr(feature = "ts", ts(export))]
22627pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22628    #[doc = "System ID (0 for broadcast)."]
22629    pub target_system: u8,
22630    #[doc = "Component ID (0 for broadcast)."]
22631    pub target_component: u8,
22632    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22634    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22635    pub id_or_mac: [u8; 20],
22636    #[doc = "Indicates the type of the operator_id field."]
22637    pub operator_id_type: MavOdidOperatorIdType,
22638    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22639    #[cfg_attr(feature = "ts", ts(type = "string"))]
22640    pub operator_id: CharArray<20>,
22641}
22642impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22643    pub const ENCODED_LEN: usize = 43usize;
22644    pub const DEFAULT: Self = Self {
22645        target_system: 0_u8,
22646        target_component: 0_u8,
22647        id_or_mac: [0_u8; 20usize],
22648        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22649        operator_id: CharArray::new([0_u8; 20usize]),
22650    };
22651    #[cfg(feature = "arbitrary")]
22652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22653        use arbitrary::{Arbitrary, Unstructured};
22654        let mut buf = [0u8; 1024];
22655        rng.fill_bytes(&mut buf);
22656        let mut unstructured = Unstructured::new(&buf);
22657        Self::arbitrary(&mut unstructured).unwrap_or_default()
22658    }
22659}
22660impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22661    fn default() -> Self {
22662        Self::DEFAULT.clone()
22663    }
22664}
22665impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22666    type Message = MavMessage;
22667    const ID: u32 = 12905u32;
22668    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22669    const EXTRA_CRC: u8 = 49u8;
22670    const ENCODED_LEN: usize = 43usize;
22671    fn deser(
22672        _version: MavlinkVersion,
22673        __input: &[u8],
22674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22675        let avail_len = __input.len();
22676        let mut payload_buf = [0; Self::ENCODED_LEN];
22677        let mut buf = if avail_len < Self::ENCODED_LEN {
22678            payload_buf[0..avail_len].copy_from_slice(__input);
22679            Bytes::new(&payload_buf)
22680        } else {
22681            Bytes::new(__input)
22682        };
22683        let mut __struct = Self::default();
22684        __struct.target_system = buf.get_u8()?;
22685        __struct.target_component = buf.get_u8()?;
22686        for v in &mut __struct.id_or_mac {
22687            let val = buf.get_u8()?;
22688            *v = val;
22689        }
22690        let tmp = buf.get_u8()?;
22691        __struct.operator_id_type =
22692            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22693                enum_type: "MavOdidOperatorIdType",
22694                value: tmp as u64,
22695            })?;
22696        let mut tmp = [0_u8; 20usize];
22697        for v in &mut tmp {
22698            *v = buf.get_u8()?;
22699        }
22700        __struct.operator_id = CharArray::new(tmp);
22701        Ok(__struct)
22702    }
22703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22704        let mut __tmp = BytesMut::new(bytes);
22705        #[allow(clippy::absurd_extreme_comparisons)]
22706        #[allow(unused_comparisons)]
22707        if __tmp.remaining() < Self::ENCODED_LEN {
22708            panic!(
22709                "buffer is too small (need {} bytes, but got {})",
22710                Self::ENCODED_LEN,
22711                __tmp.remaining(),
22712            )
22713        }
22714        __tmp.put_u8(self.target_system);
22715        __tmp.put_u8(self.target_component);
22716        for val in &self.id_or_mac {
22717            __tmp.put_u8(*val);
22718        }
22719        __tmp.put_u8(self.operator_id_type as u8);
22720        for val in &self.operator_id {
22721            __tmp.put_u8(*val);
22722        }
22723        if matches!(version, MavlinkVersion::V2) {
22724            let len = __tmp.len();
22725            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22726        } else {
22727            __tmp.len()
22728        }
22729    }
22730}
22731#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22732#[doc = ""]
22733#[doc = "ID: 12903"]
22734#[derive(Debug, Clone, PartialEq)]
22735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22737#[cfg_attr(feature = "ts", derive(TS))]
22738#[cfg_attr(feature = "ts", ts(export))]
22739pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22740    #[doc = "System ID (0 for broadcast)."]
22741    pub target_system: u8,
22742    #[doc = "Component ID (0 for broadcast)."]
22743    pub target_component: u8,
22744    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22745    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22746    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22747    pub id_or_mac: [u8; 20],
22748    #[doc = "Indicates the type of the description field."]
22749    pub description_type: MavOdidDescType,
22750    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22751    #[cfg_attr(feature = "ts", ts(type = "string"))]
22752    pub description: CharArray<23>,
22753}
22754impl OPEN_DRONE_ID_SELF_ID_DATA {
22755    pub const ENCODED_LEN: usize = 46usize;
22756    pub const DEFAULT: Self = Self {
22757        target_system: 0_u8,
22758        target_component: 0_u8,
22759        id_or_mac: [0_u8; 20usize],
22760        description_type: MavOdidDescType::DEFAULT,
22761        description: CharArray::new([0_u8; 23usize]),
22762    };
22763    #[cfg(feature = "arbitrary")]
22764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22765        use arbitrary::{Arbitrary, Unstructured};
22766        let mut buf = [0u8; 1024];
22767        rng.fill_bytes(&mut buf);
22768        let mut unstructured = Unstructured::new(&buf);
22769        Self::arbitrary(&mut unstructured).unwrap_or_default()
22770    }
22771}
22772impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22773    fn default() -> Self {
22774        Self::DEFAULT.clone()
22775    }
22776}
22777impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22778    type Message = MavMessage;
22779    const ID: u32 = 12903u32;
22780    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22781    const EXTRA_CRC: u8 = 249u8;
22782    const ENCODED_LEN: usize = 46usize;
22783    fn deser(
22784        _version: MavlinkVersion,
22785        __input: &[u8],
22786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22787        let avail_len = __input.len();
22788        let mut payload_buf = [0; Self::ENCODED_LEN];
22789        let mut buf = if avail_len < Self::ENCODED_LEN {
22790            payload_buf[0..avail_len].copy_from_slice(__input);
22791            Bytes::new(&payload_buf)
22792        } else {
22793            Bytes::new(__input)
22794        };
22795        let mut __struct = Self::default();
22796        __struct.target_system = buf.get_u8()?;
22797        __struct.target_component = buf.get_u8()?;
22798        for v in &mut __struct.id_or_mac {
22799            let val = buf.get_u8()?;
22800            *v = val;
22801        }
22802        let tmp = buf.get_u8()?;
22803        __struct.description_type =
22804            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22805                enum_type: "MavOdidDescType",
22806                value: tmp as u64,
22807            })?;
22808        let mut tmp = [0_u8; 23usize];
22809        for v in &mut tmp {
22810            *v = buf.get_u8()?;
22811        }
22812        __struct.description = CharArray::new(tmp);
22813        Ok(__struct)
22814    }
22815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22816        let mut __tmp = BytesMut::new(bytes);
22817        #[allow(clippy::absurd_extreme_comparisons)]
22818        #[allow(unused_comparisons)]
22819        if __tmp.remaining() < Self::ENCODED_LEN {
22820            panic!(
22821                "buffer is too small (need {} bytes, but got {})",
22822                Self::ENCODED_LEN,
22823                __tmp.remaining(),
22824            )
22825        }
22826        __tmp.put_u8(self.target_system);
22827        __tmp.put_u8(self.target_component);
22828        for val in &self.id_or_mac {
22829            __tmp.put_u8(*val);
22830        }
22831        __tmp.put_u8(self.description_type as u8);
22832        for val in &self.description {
22833            __tmp.put_u8(*val);
22834        }
22835        if matches!(version, MavlinkVersion::V2) {
22836            let len = __tmp.len();
22837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22838        } else {
22839            __tmp.len()
22840        }
22841    }
22842}
22843#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22844#[doc = ""]
22845#[doc = "ID: 12904"]
22846#[derive(Debug, Clone, PartialEq)]
22847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22849#[cfg_attr(feature = "ts", derive(TS))]
22850#[cfg_attr(feature = "ts", ts(export))]
22851pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22852    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22853    pub operator_latitude: i32,
22854    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22855    pub operator_longitude: i32,
22856    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22857    pub area_ceiling: f32,
22858    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22859    pub area_floor: f32,
22860    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22861    pub operator_altitude_geo: f32,
22862    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22863    pub timestamp: u32,
22864    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22865    pub area_count: u16,
22866    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22867    pub area_radius: u16,
22868    #[doc = "System ID (0 for broadcast)."]
22869    pub target_system: u8,
22870    #[doc = "Component ID (0 for broadcast)."]
22871    pub target_component: u8,
22872    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22873    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22874    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22875    pub id_or_mac: [u8; 20],
22876    #[doc = "Specifies the operator location type."]
22877    pub operator_location_type: MavOdidOperatorLocationType,
22878    #[doc = "Specifies the classification type of the UA."]
22879    pub classification_type: MavOdidClassificationType,
22880    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22881    pub category_eu: MavOdidCategoryEu,
22882    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22883    pub class_eu: MavOdidClassEu,
22884}
22885impl OPEN_DRONE_ID_SYSTEM_DATA {
22886    pub const ENCODED_LEN: usize = 54usize;
22887    pub const DEFAULT: Self = Self {
22888        operator_latitude: 0_i32,
22889        operator_longitude: 0_i32,
22890        area_ceiling: 0.0_f32,
22891        area_floor: 0.0_f32,
22892        operator_altitude_geo: 0.0_f32,
22893        timestamp: 0_u32,
22894        area_count: 0_u16,
22895        area_radius: 0_u16,
22896        target_system: 0_u8,
22897        target_component: 0_u8,
22898        id_or_mac: [0_u8; 20usize],
22899        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22900        classification_type: MavOdidClassificationType::DEFAULT,
22901        category_eu: MavOdidCategoryEu::DEFAULT,
22902        class_eu: MavOdidClassEu::DEFAULT,
22903    };
22904    #[cfg(feature = "arbitrary")]
22905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22906        use arbitrary::{Arbitrary, Unstructured};
22907        let mut buf = [0u8; 1024];
22908        rng.fill_bytes(&mut buf);
22909        let mut unstructured = Unstructured::new(&buf);
22910        Self::arbitrary(&mut unstructured).unwrap_or_default()
22911    }
22912}
22913impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22914    fn default() -> Self {
22915        Self::DEFAULT.clone()
22916    }
22917}
22918impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22919    type Message = MavMessage;
22920    const ID: u32 = 12904u32;
22921    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22922    const EXTRA_CRC: u8 = 77u8;
22923    const ENCODED_LEN: usize = 54usize;
22924    fn deser(
22925        _version: MavlinkVersion,
22926        __input: &[u8],
22927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22928        let avail_len = __input.len();
22929        let mut payload_buf = [0; Self::ENCODED_LEN];
22930        let mut buf = if avail_len < Self::ENCODED_LEN {
22931            payload_buf[0..avail_len].copy_from_slice(__input);
22932            Bytes::new(&payload_buf)
22933        } else {
22934            Bytes::new(__input)
22935        };
22936        let mut __struct = Self::default();
22937        __struct.operator_latitude = buf.get_i32_le()?;
22938        __struct.operator_longitude = buf.get_i32_le()?;
22939        __struct.area_ceiling = buf.get_f32_le()?;
22940        __struct.area_floor = buf.get_f32_le()?;
22941        __struct.operator_altitude_geo = buf.get_f32_le()?;
22942        __struct.timestamp = buf.get_u32_le()?;
22943        __struct.area_count = buf.get_u16_le()?;
22944        __struct.area_radius = buf.get_u16_le()?;
22945        __struct.target_system = buf.get_u8()?;
22946        __struct.target_component = buf.get_u8()?;
22947        for v in &mut __struct.id_or_mac {
22948            let val = buf.get_u8()?;
22949            *v = val;
22950        }
22951        let tmp = buf.get_u8()?;
22952        __struct.operator_location_type =
22953            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22954                enum_type: "MavOdidOperatorLocationType",
22955                value: tmp as u64,
22956            })?;
22957        let tmp = buf.get_u8()?;
22958        __struct.classification_type =
22959            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22960                enum_type: "MavOdidClassificationType",
22961                value: tmp as u64,
22962            })?;
22963        let tmp = buf.get_u8()?;
22964        __struct.category_eu =
22965            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22966                enum_type: "MavOdidCategoryEu",
22967                value: tmp as u64,
22968            })?;
22969        let tmp = buf.get_u8()?;
22970        __struct.class_eu =
22971            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22972                enum_type: "MavOdidClassEu",
22973                value: tmp as u64,
22974            })?;
22975        Ok(__struct)
22976    }
22977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22978        let mut __tmp = BytesMut::new(bytes);
22979        #[allow(clippy::absurd_extreme_comparisons)]
22980        #[allow(unused_comparisons)]
22981        if __tmp.remaining() < Self::ENCODED_LEN {
22982            panic!(
22983                "buffer is too small (need {} bytes, but got {})",
22984                Self::ENCODED_LEN,
22985                __tmp.remaining(),
22986            )
22987        }
22988        __tmp.put_i32_le(self.operator_latitude);
22989        __tmp.put_i32_le(self.operator_longitude);
22990        __tmp.put_f32_le(self.area_ceiling);
22991        __tmp.put_f32_le(self.area_floor);
22992        __tmp.put_f32_le(self.operator_altitude_geo);
22993        __tmp.put_u32_le(self.timestamp);
22994        __tmp.put_u16_le(self.area_count);
22995        __tmp.put_u16_le(self.area_radius);
22996        __tmp.put_u8(self.target_system);
22997        __tmp.put_u8(self.target_component);
22998        for val in &self.id_or_mac {
22999            __tmp.put_u8(*val);
23000        }
23001        __tmp.put_u8(self.operator_location_type as u8);
23002        __tmp.put_u8(self.classification_type as u8);
23003        __tmp.put_u8(self.category_eu as u8);
23004        __tmp.put_u8(self.class_eu as u8);
23005        if matches!(version, MavlinkVersion::V2) {
23006            let len = __tmp.len();
23007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23008        } else {
23009            __tmp.len()
23010        }
23011    }
23012}
23013#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23014#[doc = ""]
23015#[doc = "ID: 12919"]
23016#[derive(Debug, Clone, PartialEq)]
23017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23019#[cfg_attr(feature = "ts", derive(TS))]
23020#[cfg_attr(feature = "ts", ts(export))]
23021pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23022    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23023    pub operator_latitude: i32,
23024    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23025    pub operator_longitude: i32,
23026    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23027    pub operator_altitude_geo: f32,
23028    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23029    pub timestamp: u32,
23030    #[doc = "System ID (0 for broadcast)."]
23031    pub target_system: u8,
23032    #[doc = "Component ID (0 for broadcast)."]
23033    pub target_component: u8,
23034}
23035impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23036    pub const ENCODED_LEN: usize = 18usize;
23037    pub const DEFAULT: Self = Self {
23038        operator_latitude: 0_i32,
23039        operator_longitude: 0_i32,
23040        operator_altitude_geo: 0.0_f32,
23041        timestamp: 0_u32,
23042        target_system: 0_u8,
23043        target_component: 0_u8,
23044    };
23045    #[cfg(feature = "arbitrary")]
23046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23047        use arbitrary::{Arbitrary, Unstructured};
23048        let mut buf = [0u8; 1024];
23049        rng.fill_bytes(&mut buf);
23050        let mut unstructured = Unstructured::new(&buf);
23051        Self::arbitrary(&mut unstructured).unwrap_or_default()
23052    }
23053}
23054impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23055    fn default() -> Self {
23056        Self::DEFAULT.clone()
23057    }
23058}
23059impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23060    type Message = MavMessage;
23061    const ID: u32 = 12919u32;
23062    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23063    const EXTRA_CRC: u8 = 7u8;
23064    const ENCODED_LEN: usize = 18usize;
23065    fn deser(
23066        _version: MavlinkVersion,
23067        __input: &[u8],
23068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23069        let avail_len = __input.len();
23070        let mut payload_buf = [0; Self::ENCODED_LEN];
23071        let mut buf = if avail_len < Self::ENCODED_LEN {
23072            payload_buf[0..avail_len].copy_from_slice(__input);
23073            Bytes::new(&payload_buf)
23074        } else {
23075            Bytes::new(__input)
23076        };
23077        let mut __struct = Self::default();
23078        __struct.operator_latitude = buf.get_i32_le()?;
23079        __struct.operator_longitude = buf.get_i32_le()?;
23080        __struct.operator_altitude_geo = buf.get_f32_le()?;
23081        __struct.timestamp = buf.get_u32_le()?;
23082        __struct.target_system = buf.get_u8()?;
23083        __struct.target_component = buf.get_u8()?;
23084        Ok(__struct)
23085    }
23086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23087        let mut __tmp = BytesMut::new(bytes);
23088        #[allow(clippy::absurd_extreme_comparisons)]
23089        #[allow(unused_comparisons)]
23090        if __tmp.remaining() < Self::ENCODED_LEN {
23091            panic!(
23092                "buffer is too small (need {} bytes, but got {})",
23093                Self::ENCODED_LEN,
23094                __tmp.remaining(),
23095            )
23096        }
23097        __tmp.put_i32_le(self.operator_latitude);
23098        __tmp.put_i32_le(self.operator_longitude);
23099        __tmp.put_f32_le(self.operator_altitude_geo);
23100        __tmp.put_u32_le(self.timestamp);
23101        __tmp.put_u8(self.target_system);
23102        __tmp.put_u8(self.target_component);
23103        if matches!(version, MavlinkVersion::V2) {
23104            let len = __tmp.len();
23105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23106        } else {
23107            __tmp.len()
23108        }
23109    }
23110}
23111#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23112#[doc = ""]
23113#[doc = "ID: 100"]
23114#[derive(Debug, Clone, PartialEq)]
23115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23117#[cfg_attr(feature = "ts", derive(TS))]
23118#[cfg_attr(feature = "ts", ts(export))]
23119pub struct OPTICAL_FLOW_DATA {
23120    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23121    pub time_usec: u64,
23122    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23123    pub flow_comp_m_x: f32,
23124    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23125    pub flow_comp_m_y: f32,
23126    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23127    pub ground_distance: f32,
23128    #[doc = "Flow in x-sensor direction"]
23129    pub flow_x: i16,
23130    #[doc = "Flow in y-sensor direction"]
23131    pub flow_y: i16,
23132    #[doc = "Sensor ID"]
23133    pub sensor_id: u8,
23134    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23135    pub quality: u8,
23136    #[doc = "Flow rate about X axis"]
23137    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23138    pub flow_rate_x: f32,
23139    #[doc = "Flow rate about Y axis"]
23140    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23141    pub flow_rate_y: f32,
23142}
23143impl OPTICAL_FLOW_DATA {
23144    pub const ENCODED_LEN: usize = 34usize;
23145    pub const DEFAULT: Self = Self {
23146        time_usec: 0_u64,
23147        flow_comp_m_x: 0.0_f32,
23148        flow_comp_m_y: 0.0_f32,
23149        ground_distance: 0.0_f32,
23150        flow_x: 0_i16,
23151        flow_y: 0_i16,
23152        sensor_id: 0_u8,
23153        quality: 0_u8,
23154        flow_rate_x: 0.0_f32,
23155        flow_rate_y: 0.0_f32,
23156    };
23157    #[cfg(feature = "arbitrary")]
23158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23159        use arbitrary::{Arbitrary, Unstructured};
23160        let mut buf = [0u8; 1024];
23161        rng.fill_bytes(&mut buf);
23162        let mut unstructured = Unstructured::new(&buf);
23163        Self::arbitrary(&mut unstructured).unwrap_or_default()
23164    }
23165}
23166impl Default for OPTICAL_FLOW_DATA {
23167    fn default() -> Self {
23168        Self::DEFAULT.clone()
23169    }
23170}
23171impl MessageData for OPTICAL_FLOW_DATA {
23172    type Message = MavMessage;
23173    const ID: u32 = 100u32;
23174    const NAME: &'static str = "OPTICAL_FLOW";
23175    const EXTRA_CRC: u8 = 175u8;
23176    const ENCODED_LEN: usize = 34usize;
23177    fn deser(
23178        _version: MavlinkVersion,
23179        __input: &[u8],
23180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23181        let avail_len = __input.len();
23182        let mut payload_buf = [0; Self::ENCODED_LEN];
23183        let mut buf = if avail_len < Self::ENCODED_LEN {
23184            payload_buf[0..avail_len].copy_from_slice(__input);
23185            Bytes::new(&payload_buf)
23186        } else {
23187            Bytes::new(__input)
23188        };
23189        let mut __struct = Self::default();
23190        __struct.time_usec = buf.get_u64_le()?;
23191        __struct.flow_comp_m_x = buf.get_f32_le()?;
23192        __struct.flow_comp_m_y = buf.get_f32_le()?;
23193        __struct.ground_distance = buf.get_f32_le()?;
23194        __struct.flow_x = buf.get_i16_le()?;
23195        __struct.flow_y = buf.get_i16_le()?;
23196        __struct.sensor_id = buf.get_u8()?;
23197        __struct.quality = buf.get_u8()?;
23198        __struct.flow_rate_x = buf.get_f32_le()?;
23199        __struct.flow_rate_y = buf.get_f32_le()?;
23200        Ok(__struct)
23201    }
23202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23203        let mut __tmp = BytesMut::new(bytes);
23204        #[allow(clippy::absurd_extreme_comparisons)]
23205        #[allow(unused_comparisons)]
23206        if __tmp.remaining() < Self::ENCODED_LEN {
23207            panic!(
23208                "buffer is too small (need {} bytes, but got {})",
23209                Self::ENCODED_LEN,
23210                __tmp.remaining(),
23211            )
23212        }
23213        __tmp.put_u64_le(self.time_usec);
23214        __tmp.put_f32_le(self.flow_comp_m_x);
23215        __tmp.put_f32_le(self.flow_comp_m_y);
23216        __tmp.put_f32_le(self.ground_distance);
23217        __tmp.put_i16_le(self.flow_x);
23218        __tmp.put_i16_le(self.flow_y);
23219        __tmp.put_u8(self.sensor_id);
23220        __tmp.put_u8(self.quality);
23221        if matches!(version, MavlinkVersion::V2) {
23222            __tmp.put_f32_le(self.flow_rate_x);
23223            __tmp.put_f32_le(self.flow_rate_y);
23224            let len = __tmp.len();
23225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23226        } else {
23227            __tmp.len()
23228        }
23229    }
23230}
23231#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23232#[doc = ""]
23233#[doc = "ID: 106"]
23234#[derive(Debug, Clone, PartialEq)]
23235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23237#[cfg_attr(feature = "ts", derive(TS))]
23238#[cfg_attr(feature = "ts", ts(export))]
23239pub struct OPTICAL_FLOW_RAD_DATA {
23240    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23241    pub time_usec: u64,
23242    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23243    pub integration_time_us: u32,
23244    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23245    pub integrated_x: f32,
23246    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23247    pub integrated_y: f32,
23248    #[doc = "RH rotation around X axis"]
23249    pub integrated_xgyro: f32,
23250    #[doc = "RH rotation around Y axis"]
23251    pub integrated_ygyro: f32,
23252    #[doc = "RH rotation around Z axis"]
23253    pub integrated_zgyro: f32,
23254    #[doc = "Time since the distance was sampled."]
23255    pub time_delta_distance_us: u32,
23256    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23257    pub distance: f32,
23258    #[doc = "Temperature"]
23259    pub temperature: i16,
23260    #[doc = "Sensor ID"]
23261    pub sensor_id: u8,
23262    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23263    pub quality: u8,
23264}
23265impl OPTICAL_FLOW_RAD_DATA {
23266    pub const ENCODED_LEN: usize = 44usize;
23267    pub const DEFAULT: Self = Self {
23268        time_usec: 0_u64,
23269        integration_time_us: 0_u32,
23270        integrated_x: 0.0_f32,
23271        integrated_y: 0.0_f32,
23272        integrated_xgyro: 0.0_f32,
23273        integrated_ygyro: 0.0_f32,
23274        integrated_zgyro: 0.0_f32,
23275        time_delta_distance_us: 0_u32,
23276        distance: 0.0_f32,
23277        temperature: 0_i16,
23278        sensor_id: 0_u8,
23279        quality: 0_u8,
23280    };
23281    #[cfg(feature = "arbitrary")]
23282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23283        use arbitrary::{Arbitrary, Unstructured};
23284        let mut buf = [0u8; 1024];
23285        rng.fill_bytes(&mut buf);
23286        let mut unstructured = Unstructured::new(&buf);
23287        Self::arbitrary(&mut unstructured).unwrap_or_default()
23288    }
23289}
23290impl Default for OPTICAL_FLOW_RAD_DATA {
23291    fn default() -> Self {
23292        Self::DEFAULT.clone()
23293    }
23294}
23295impl MessageData for OPTICAL_FLOW_RAD_DATA {
23296    type Message = MavMessage;
23297    const ID: u32 = 106u32;
23298    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23299    const EXTRA_CRC: u8 = 138u8;
23300    const ENCODED_LEN: usize = 44usize;
23301    fn deser(
23302        _version: MavlinkVersion,
23303        __input: &[u8],
23304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23305        let avail_len = __input.len();
23306        let mut payload_buf = [0; Self::ENCODED_LEN];
23307        let mut buf = if avail_len < Self::ENCODED_LEN {
23308            payload_buf[0..avail_len].copy_from_slice(__input);
23309            Bytes::new(&payload_buf)
23310        } else {
23311            Bytes::new(__input)
23312        };
23313        let mut __struct = Self::default();
23314        __struct.time_usec = buf.get_u64_le()?;
23315        __struct.integration_time_us = buf.get_u32_le()?;
23316        __struct.integrated_x = buf.get_f32_le()?;
23317        __struct.integrated_y = buf.get_f32_le()?;
23318        __struct.integrated_xgyro = buf.get_f32_le()?;
23319        __struct.integrated_ygyro = buf.get_f32_le()?;
23320        __struct.integrated_zgyro = buf.get_f32_le()?;
23321        __struct.time_delta_distance_us = buf.get_u32_le()?;
23322        __struct.distance = buf.get_f32_le()?;
23323        __struct.temperature = buf.get_i16_le()?;
23324        __struct.sensor_id = buf.get_u8()?;
23325        __struct.quality = buf.get_u8()?;
23326        Ok(__struct)
23327    }
23328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23329        let mut __tmp = BytesMut::new(bytes);
23330        #[allow(clippy::absurd_extreme_comparisons)]
23331        #[allow(unused_comparisons)]
23332        if __tmp.remaining() < Self::ENCODED_LEN {
23333            panic!(
23334                "buffer is too small (need {} bytes, but got {})",
23335                Self::ENCODED_LEN,
23336                __tmp.remaining(),
23337            )
23338        }
23339        __tmp.put_u64_le(self.time_usec);
23340        __tmp.put_u32_le(self.integration_time_us);
23341        __tmp.put_f32_le(self.integrated_x);
23342        __tmp.put_f32_le(self.integrated_y);
23343        __tmp.put_f32_le(self.integrated_xgyro);
23344        __tmp.put_f32_le(self.integrated_ygyro);
23345        __tmp.put_f32_le(self.integrated_zgyro);
23346        __tmp.put_u32_le(self.time_delta_distance_us);
23347        __tmp.put_f32_le(self.distance);
23348        __tmp.put_i16_le(self.temperature);
23349        __tmp.put_u8(self.sensor_id);
23350        __tmp.put_u8(self.quality);
23351        if matches!(version, MavlinkVersion::V2) {
23352            let len = __tmp.len();
23353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23354        } else {
23355            __tmp.len()
23356        }
23357    }
23358}
23359#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23360#[doc = ""]
23361#[doc = "ID: 360"]
23362#[derive(Debug, Clone, PartialEq)]
23363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23365#[cfg_attr(feature = "ts", derive(TS))]
23366#[cfg_attr(feature = "ts", ts(export))]
23367pub struct ORBIT_EXECUTION_STATUS_DATA {
23368    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23369    pub time_usec: u64,
23370    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23371    pub radius: f32,
23372    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23373    pub x: i32,
23374    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23375    pub y: i32,
23376    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23377    pub z: f32,
23378    #[doc = "The coordinate system of the fields: x, y, z."]
23379    pub frame: MavFrame,
23380}
23381impl ORBIT_EXECUTION_STATUS_DATA {
23382    pub const ENCODED_LEN: usize = 25usize;
23383    pub const DEFAULT: Self = Self {
23384        time_usec: 0_u64,
23385        radius: 0.0_f32,
23386        x: 0_i32,
23387        y: 0_i32,
23388        z: 0.0_f32,
23389        frame: MavFrame::DEFAULT,
23390    };
23391    #[cfg(feature = "arbitrary")]
23392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23393        use arbitrary::{Arbitrary, Unstructured};
23394        let mut buf = [0u8; 1024];
23395        rng.fill_bytes(&mut buf);
23396        let mut unstructured = Unstructured::new(&buf);
23397        Self::arbitrary(&mut unstructured).unwrap_or_default()
23398    }
23399}
23400impl Default for ORBIT_EXECUTION_STATUS_DATA {
23401    fn default() -> Self {
23402        Self::DEFAULT.clone()
23403    }
23404}
23405impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23406    type Message = MavMessage;
23407    const ID: u32 = 360u32;
23408    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23409    const EXTRA_CRC: u8 = 11u8;
23410    const ENCODED_LEN: usize = 25usize;
23411    fn deser(
23412        _version: MavlinkVersion,
23413        __input: &[u8],
23414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23415        let avail_len = __input.len();
23416        let mut payload_buf = [0; Self::ENCODED_LEN];
23417        let mut buf = if avail_len < Self::ENCODED_LEN {
23418            payload_buf[0..avail_len].copy_from_slice(__input);
23419            Bytes::new(&payload_buf)
23420        } else {
23421            Bytes::new(__input)
23422        };
23423        let mut __struct = Self::default();
23424        __struct.time_usec = buf.get_u64_le()?;
23425        __struct.radius = buf.get_f32_le()?;
23426        __struct.x = buf.get_i32_le()?;
23427        __struct.y = buf.get_i32_le()?;
23428        __struct.z = buf.get_f32_le()?;
23429        let tmp = buf.get_u8()?;
23430        __struct.frame =
23431            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23432                enum_type: "MavFrame",
23433                value: tmp as u64,
23434            })?;
23435        Ok(__struct)
23436    }
23437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23438        let mut __tmp = BytesMut::new(bytes);
23439        #[allow(clippy::absurd_extreme_comparisons)]
23440        #[allow(unused_comparisons)]
23441        if __tmp.remaining() < Self::ENCODED_LEN {
23442            panic!(
23443                "buffer is too small (need {} bytes, but got {})",
23444                Self::ENCODED_LEN,
23445                __tmp.remaining(),
23446            )
23447        }
23448        __tmp.put_u64_le(self.time_usec);
23449        __tmp.put_f32_le(self.radius);
23450        __tmp.put_i32_le(self.x);
23451        __tmp.put_i32_le(self.y);
23452        __tmp.put_f32_le(self.z);
23453        __tmp.put_u8(self.frame as u8);
23454        if matches!(version, MavlinkVersion::V2) {
23455            let len = __tmp.len();
23456            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23457        } else {
23458            __tmp.len()
23459        }
23460    }
23461}
23462#[doc = "Response from a PARAM_EXT_SET message."]
23463#[doc = ""]
23464#[doc = "ID: 324"]
23465#[derive(Debug, Clone, PartialEq)]
23466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23468#[cfg_attr(feature = "ts", derive(TS))]
23469#[cfg_attr(feature = "ts", ts(export))]
23470pub struct PARAM_EXT_ACK_DATA {
23471    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23472    #[cfg_attr(feature = "ts", ts(type = "string"))]
23473    pub param_id: CharArray<16>,
23474    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23475    #[cfg_attr(feature = "ts", ts(type = "string"))]
23476    pub param_value: CharArray<128>,
23477    #[doc = "Parameter type."]
23478    pub param_type: MavParamExtType,
23479    #[doc = "Result code."]
23480    pub param_result: ParamAck,
23481}
23482impl PARAM_EXT_ACK_DATA {
23483    pub const ENCODED_LEN: usize = 146usize;
23484    pub const DEFAULT: Self = Self {
23485        param_id: CharArray::new([0_u8; 16usize]),
23486        param_value: CharArray::new([0_u8; 128usize]),
23487        param_type: MavParamExtType::DEFAULT,
23488        param_result: ParamAck::DEFAULT,
23489    };
23490    #[cfg(feature = "arbitrary")]
23491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23492        use arbitrary::{Arbitrary, Unstructured};
23493        let mut buf = [0u8; 1024];
23494        rng.fill_bytes(&mut buf);
23495        let mut unstructured = Unstructured::new(&buf);
23496        Self::arbitrary(&mut unstructured).unwrap_or_default()
23497    }
23498}
23499impl Default for PARAM_EXT_ACK_DATA {
23500    fn default() -> Self {
23501        Self::DEFAULT.clone()
23502    }
23503}
23504impl MessageData for PARAM_EXT_ACK_DATA {
23505    type Message = MavMessage;
23506    const ID: u32 = 324u32;
23507    const NAME: &'static str = "PARAM_EXT_ACK";
23508    const EXTRA_CRC: u8 = 132u8;
23509    const ENCODED_LEN: usize = 146usize;
23510    fn deser(
23511        _version: MavlinkVersion,
23512        __input: &[u8],
23513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23514        let avail_len = __input.len();
23515        let mut payload_buf = [0; Self::ENCODED_LEN];
23516        let mut buf = if avail_len < Self::ENCODED_LEN {
23517            payload_buf[0..avail_len].copy_from_slice(__input);
23518            Bytes::new(&payload_buf)
23519        } else {
23520            Bytes::new(__input)
23521        };
23522        let mut __struct = Self::default();
23523        let mut tmp = [0_u8; 16usize];
23524        for v in &mut tmp {
23525            *v = buf.get_u8()?;
23526        }
23527        __struct.param_id = CharArray::new(tmp);
23528        let mut tmp = [0_u8; 128usize];
23529        for v in &mut tmp {
23530            *v = buf.get_u8()?;
23531        }
23532        __struct.param_value = CharArray::new(tmp);
23533        let tmp = buf.get_u8()?;
23534        __struct.param_type =
23535            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23536                enum_type: "MavParamExtType",
23537                value: tmp as u64,
23538            })?;
23539        let tmp = buf.get_u8()?;
23540        __struct.param_result =
23541            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23542                enum_type: "ParamAck",
23543                value: tmp as u64,
23544            })?;
23545        Ok(__struct)
23546    }
23547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23548        let mut __tmp = BytesMut::new(bytes);
23549        #[allow(clippy::absurd_extreme_comparisons)]
23550        #[allow(unused_comparisons)]
23551        if __tmp.remaining() < Self::ENCODED_LEN {
23552            panic!(
23553                "buffer is too small (need {} bytes, but got {})",
23554                Self::ENCODED_LEN,
23555                __tmp.remaining(),
23556            )
23557        }
23558        for val in &self.param_id {
23559            __tmp.put_u8(*val);
23560        }
23561        for val in &self.param_value {
23562            __tmp.put_u8(*val);
23563        }
23564        __tmp.put_u8(self.param_type as u8);
23565        __tmp.put_u8(self.param_result as u8);
23566        if matches!(version, MavlinkVersion::V2) {
23567            let len = __tmp.len();
23568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23569        } else {
23570            __tmp.len()
23571        }
23572    }
23573}
23574#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23575#[doc = ""]
23576#[doc = "ID: 321"]
23577#[derive(Debug, Clone, PartialEq)]
23578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23580#[cfg_attr(feature = "ts", derive(TS))]
23581#[cfg_attr(feature = "ts", ts(export))]
23582pub struct PARAM_EXT_REQUEST_LIST_DATA {
23583    #[doc = "System ID"]
23584    pub target_system: u8,
23585    #[doc = "Component ID"]
23586    pub target_component: u8,
23587}
23588impl PARAM_EXT_REQUEST_LIST_DATA {
23589    pub const ENCODED_LEN: usize = 2usize;
23590    pub const DEFAULT: Self = Self {
23591        target_system: 0_u8,
23592        target_component: 0_u8,
23593    };
23594    #[cfg(feature = "arbitrary")]
23595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23596        use arbitrary::{Arbitrary, Unstructured};
23597        let mut buf = [0u8; 1024];
23598        rng.fill_bytes(&mut buf);
23599        let mut unstructured = Unstructured::new(&buf);
23600        Self::arbitrary(&mut unstructured).unwrap_or_default()
23601    }
23602}
23603impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23604    fn default() -> Self {
23605        Self::DEFAULT.clone()
23606    }
23607}
23608impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23609    type Message = MavMessage;
23610    const ID: u32 = 321u32;
23611    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23612    const EXTRA_CRC: u8 = 88u8;
23613    const ENCODED_LEN: usize = 2usize;
23614    fn deser(
23615        _version: MavlinkVersion,
23616        __input: &[u8],
23617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23618        let avail_len = __input.len();
23619        let mut payload_buf = [0; Self::ENCODED_LEN];
23620        let mut buf = if avail_len < Self::ENCODED_LEN {
23621            payload_buf[0..avail_len].copy_from_slice(__input);
23622            Bytes::new(&payload_buf)
23623        } else {
23624            Bytes::new(__input)
23625        };
23626        let mut __struct = Self::default();
23627        __struct.target_system = buf.get_u8()?;
23628        __struct.target_component = buf.get_u8()?;
23629        Ok(__struct)
23630    }
23631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23632        let mut __tmp = BytesMut::new(bytes);
23633        #[allow(clippy::absurd_extreme_comparisons)]
23634        #[allow(unused_comparisons)]
23635        if __tmp.remaining() < Self::ENCODED_LEN {
23636            panic!(
23637                "buffer is too small (need {} bytes, but got {})",
23638                Self::ENCODED_LEN,
23639                __tmp.remaining(),
23640            )
23641        }
23642        __tmp.put_u8(self.target_system);
23643        __tmp.put_u8(self.target_component);
23644        if matches!(version, MavlinkVersion::V2) {
23645            let len = __tmp.len();
23646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23647        } else {
23648            __tmp.len()
23649        }
23650    }
23651}
23652#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23653#[doc = ""]
23654#[doc = "ID: 320"]
23655#[derive(Debug, Clone, PartialEq)]
23656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23658#[cfg_attr(feature = "ts", derive(TS))]
23659#[cfg_attr(feature = "ts", ts(export))]
23660pub struct PARAM_EXT_REQUEST_READ_DATA {
23661    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23662    pub param_index: i16,
23663    #[doc = "System ID"]
23664    pub target_system: u8,
23665    #[doc = "Component ID"]
23666    pub target_component: u8,
23667    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23668    #[cfg_attr(feature = "ts", ts(type = "string"))]
23669    pub param_id: CharArray<16>,
23670}
23671impl PARAM_EXT_REQUEST_READ_DATA {
23672    pub const ENCODED_LEN: usize = 20usize;
23673    pub const DEFAULT: Self = Self {
23674        param_index: 0_i16,
23675        target_system: 0_u8,
23676        target_component: 0_u8,
23677        param_id: CharArray::new([0_u8; 16usize]),
23678    };
23679    #[cfg(feature = "arbitrary")]
23680    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23681        use arbitrary::{Arbitrary, Unstructured};
23682        let mut buf = [0u8; 1024];
23683        rng.fill_bytes(&mut buf);
23684        let mut unstructured = Unstructured::new(&buf);
23685        Self::arbitrary(&mut unstructured).unwrap_or_default()
23686    }
23687}
23688impl Default for PARAM_EXT_REQUEST_READ_DATA {
23689    fn default() -> Self {
23690        Self::DEFAULT.clone()
23691    }
23692}
23693impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23694    type Message = MavMessage;
23695    const ID: u32 = 320u32;
23696    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23697    const EXTRA_CRC: u8 = 243u8;
23698    const ENCODED_LEN: usize = 20usize;
23699    fn deser(
23700        _version: MavlinkVersion,
23701        __input: &[u8],
23702    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23703        let avail_len = __input.len();
23704        let mut payload_buf = [0; Self::ENCODED_LEN];
23705        let mut buf = if avail_len < Self::ENCODED_LEN {
23706            payload_buf[0..avail_len].copy_from_slice(__input);
23707            Bytes::new(&payload_buf)
23708        } else {
23709            Bytes::new(__input)
23710        };
23711        let mut __struct = Self::default();
23712        __struct.param_index = buf.get_i16_le()?;
23713        __struct.target_system = buf.get_u8()?;
23714        __struct.target_component = buf.get_u8()?;
23715        let mut tmp = [0_u8; 16usize];
23716        for v in &mut tmp {
23717            *v = buf.get_u8()?;
23718        }
23719        __struct.param_id = CharArray::new(tmp);
23720        Ok(__struct)
23721    }
23722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23723        let mut __tmp = BytesMut::new(bytes);
23724        #[allow(clippy::absurd_extreme_comparisons)]
23725        #[allow(unused_comparisons)]
23726        if __tmp.remaining() < Self::ENCODED_LEN {
23727            panic!(
23728                "buffer is too small (need {} bytes, but got {})",
23729                Self::ENCODED_LEN,
23730                __tmp.remaining(),
23731            )
23732        }
23733        __tmp.put_i16_le(self.param_index);
23734        __tmp.put_u8(self.target_system);
23735        __tmp.put_u8(self.target_component);
23736        for val in &self.param_id {
23737            __tmp.put_u8(*val);
23738        }
23739        if matches!(version, MavlinkVersion::V2) {
23740            let len = __tmp.len();
23741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23742        } else {
23743            __tmp.len()
23744        }
23745    }
23746}
23747#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23748#[doc = ""]
23749#[doc = "ID: 323"]
23750#[derive(Debug, Clone, PartialEq)]
23751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23753#[cfg_attr(feature = "ts", derive(TS))]
23754#[cfg_attr(feature = "ts", ts(export))]
23755pub struct PARAM_EXT_SET_DATA {
23756    #[doc = "System ID"]
23757    pub target_system: u8,
23758    #[doc = "Component ID"]
23759    pub target_component: u8,
23760    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23761    #[cfg_attr(feature = "ts", ts(type = "string"))]
23762    pub param_id: CharArray<16>,
23763    #[doc = "Parameter value"]
23764    #[cfg_attr(feature = "ts", ts(type = "string"))]
23765    pub param_value: CharArray<128>,
23766    #[doc = "Parameter type."]
23767    pub param_type: MavParamExtType,
23768}
23769impl PARAM_EXT_SET_DATA {
23770    pub const ENCODED_LEN: usize = 147usize;
23771    pub const DEFAULT: Self = Self {
23772        target_system: 0_u8,
23773        target_component: 0_u8,
23774        param_id: CharArray::new([0_u8; 16usize]),
23775        param_value: CharArray::new([0_u8; 128usize]),
23776        param_type: MavParamExtType::DEFAULT,
23777    };
23778    #[cfg(feature = "arbitrary")]
23779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23780        use arbitrary::{Arbitrary, Unstructured};
23781        let mut buf = [0u8; 1024];
23782        rng.fill_bytes(&mut buf);
23783        let mut unstructured = Unstructured::new(&buf);
23784        Self::arbitrary(&mut unstructured).unwrap_or_default()
23785    }
23786}
23787impl Default for PARAM_EXT_SET_DATA {
23788    fn default() -> Self {
23789        Self::DEFAULT.clone()
23790    }
23791}
23792impl MessageData for PARAM_EXT_SET_DATA {
23793    type Message = MavMessage;
23794    const ID: u32 = 323u32;
23795    const NAME: &'static str = "PARAM_EXT_SET";
23796    const EXTRA_CRC: u8 = 78u8;
23797    const ENCODED_LEN: usize = 147usize;
23798    fn deser(
23799        _version: MavlinkVersion,
23800        __input: &[u8],
23801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23802        let avail_len = __input.len();
23803        let mut payload_buf = [0; Self::ENCODED_LEN];
23804        let mut buf = if avail_len < Self::ENCODED_LEN {
23805            payload_buf[0..avail_len].copy_from_slice(__input);
23806            Bytes::new(&payload_buf)
23807        } else {
23808            Bytes::new(__input)
23809        };
23810        let mut __struct = Self::default();
23811        __struct.target_system = buf.get_u8()?;
23812        __struct.target_component = buf.get_u8()?;
23813        let mut tmp = [0_u8; 16usize];
23814        for v in &mut tmp {
23815            *v = buf.get_u8()?;
23816        }
23817        __struct.param_id = CharArray::new(tmp);
23818        let mut tmp = [0_u8; 128usize];
23819        for v in &mut tmp {
23820            *v = buf.get_u8()?;
23821        }
23822        __struct.param_value = CharArray::new(tmp);
23823        let tmp = buf.get_u8()?;
23824        __struct.param_type =
23825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23826                enum_type: "MavParamExtType",
23827                value: tmp as u64,
23828            })?;
23829        Ok(__struct)
23830    }
23831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23832        let mut __tmp = BytesMut::new(bytes);
23833        #[allow(clippy::absurd_extreme_comparisons)]
23834        #[allow(unused_comparisons)]
23835        if __tmp.remaining() < Self::ENCODED_LEN {
23836            panic!(
23837                "buffer is too small (need {} bytes, but got {})",
23838                Self::ENCODED_LEN,
23839                __tmp.remaining(),
23840            )
23841        }
23842        __tmp.put_u8(self.target_system);
23843        __tmp.put_u8(self.target_component);
23844        for val in &self.param_id {
23845            __tmp.put_u8(*val);
23846        }
23847        for val in &self.param_value {
23848            __tmp.put_u8(*val);
23849        }
23850        __tmp.put_u8(self.param_type as u8);
23851        if matches!(version, MavlinkVersion::V2) {
23852            let len = __tmp.len();
23853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23854        } else {
23855            __tmp.len()
23856        }
23857    }
23858}
23859#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23860#[doc = ""]
23861#[doc = "ID: 322"]
23862#[derive(Debug, Clone, PartialEq)]
23863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23865#[cfg_attr(feature = "ts", derive(TS))]
23866#[cfg_attr(feature = "ts", ts(export))]
23867pub struct PARAM_EXT_VALUE_DATA {
23868    #[doc = "Total number of parameters"]
23869    pub param_count: u16,
23870    #[doc = "Index of this parameter"]
23871    pub param_index: u16,
23872    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23873    #[cfg_attr(feature = "ts", ts(type = "string"))]
23874    pub param_id: CharArray<16>,
23875    #[doc = "Parameter value"]
23876    #[cfg_attr(feature = "ts", ts(type = "string"))]
23877    pub param_value: CharArray<128>,
23878    #[doc = "Parameter type."]
23879    pub param_type: MavParamExtType,
23880}
23881impl PARAM_EXT_VALUE_DATA {
23882    pub const ENCODED_LEN: usize = 149usize;
23883    pub const DEFAULT: Self = Self {
23884        param_count: 0_u16,
23885        param_index: 0_u16,
23886        param_id: CharArray::new([0_u8; 16usize]),
23887        param_value: CharArray::new([0_u8; 128usize]),
23888        param_type: MavParamExtType::DEFAULT,
23889    };
23890    #[cfg(feature = "arbitrary")]
23891    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23892        use arbitrary::{Arbitrary, Unstructured};
23893        let mut buf = [0u8; 1024];
23894        rng.fill_bytes(&mut buf);
23895        let mut unstructured = Unstructured::new(&buf);
23896        Self::arbitrary(&mut unstructured).unwrap_or_default()
23897    }
23898}
23899impl Default for PARAM_EXT_VALUE_DATA {
23900    fn default() -> Self {
23901        Self::DEFAULT.clone()
23902    }
23903}
23904impl MessageData for PARAM_EXT_VALUE_DATA {
23905    type Message = MavMessage;
23906    const ID: u32 = 322u32;
23907    const NAME: &'static str = "PARAM_EXT_VALUE";
23908    const EXTRA_CRC: u8 = 243u8;
23909    const ENCODED_LEN: usize = 149usize;
23910    fn deser(
23911        _version: MavlinkVersion,
23912        __input: &[u8],
23913    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23914        let avail_len = __input.len();
23915        let mut payload_buf = [0; Self::ENCODED_LEN];
23916        let mut buf = if avail_len < Self::ENCODED_LEN {
23917            payload_buf[0..avail_len].copy_from_slice(__input);
23918            Bytes::new(&payload_buf)
23919        } else {
23920            Bytes::new(__input)
23921        };
23922        let mut __struct = Self::default();
23923        __struct.param_count = buf.get_u16_le()?;
23924        __struct.param_index = buf.get_u16_le()?;
23925        let mut tmp = [0_u8; 16usize];
23926        for v in &mut tmp {
23927            *v = buf.get_u8()?;
23928        }
23929        __struct.param_id = CharArray::new(tmp);
23930        let mut tmp = [0_u8; 128usize];
23931        for v in &mut tmp {
23932            *v = buf.get_u8()?;
23933        }
23934        __struct.param_value = CharArray::new(tmp);
23935        let tmp = buf.get_u8()?;
23936        __struct.param_type =
23937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23938                enum_type: "MavParamExtType",
23939                value: tmp as u64,
23940            })?;
23941        Ok(__struct)
23942    }
23943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23944        let mut __tmp = BytesMut::new(bytes);
23945        #[allow(clippy::absurd_extreme_comparisons)]
23946        #[allow(unused_comparisons)]
23947        if __tmp.remaining() < Self::ENCODED_LEN {
23948            panic!(
23949                "buffer is too small (need {} bytes, but got {})",
23950                Self::ENCODED_LEN,
23951                __tmp.remaining(),
23952            )
23953        }
23954        __tmp.put_u16_le(self.param_count);
23955        __tmp.put_u16_le(self.param_index);
23956        for val in &self.param_id {
23957            __tmp.put_u8(*val);
23958        }
23959        for val in &self.param_value {
23960            __tmp.put_u8(*val);
23961        }
23962        __tmp.put_u8(self.param_type as u8);
23963        if matches!(version, MavlinkVersion::V2) {
23964            let len = __tmp.len();
23965            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23966        } else {
23967            __tmp.len()
23968        }
23969    }
23970}
23971#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23972#[doc = ""]
23973#[doc = "ID: 50"]
23974#[derive(Debug, Clone, PartialEq)]
23975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23977#[cfg_attr(feature = "ts", derive(TS))]
23978#[cfg_attr(feature = "ts", ts(export))]
23979pub struct PARAM_MAP_RC_DATA {
23980    #[doc = "Initial parameter value"]
23981    pub param_value0: f32,
23982    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23983    pub scale: f32,
23984    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23985    pub param_value_min: f32,
23986    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23987    pub param_value_max: f32,
23988    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23989    pub param_index: i16,
23990    #[doc = "System ID"]
23991    pub target_system: u8,
23992    #[doc = "Component ID"]
23993    pub target_component: u8,
23994    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23995    #[cfg_attr(feature = "ts", ts(type = "string"))]
23996    pub param_id: CharArray<16>,
23997    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23998    pub parameter_rc_channel_index: u8,
23999}
24000impl PARAM_MAP_RC_DATA {
24001    pub const ENCODED_LEN: usize = 37usize;
24002    pub const DEFAULT: Self = Self {
24003        param_value0: 0.0_f32,
24004        scale: 0.0_f32,
24005        param_value_min: 0.0_f32,
24006        param_value_max: 0.0_f32,
24007        param_index: 0_i16,
24008        target_system: 0_u8,
24009        target_component: 0_u8,
24010        param_id: CharArray::new([0_u8; 16usize]),
24011        parameter_rc_channel_index: 0_u8,
24012    };
24013    #[cfg(feature = "arbitrary")]
24014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24015        use arbitrary::{Arbitrary, Unstructured};
24016        let mut buf = [0u8; 1024];
24017        rng.fill_bytes(&mut buf);
24018        let mut unstructured = Unstructured::new(&buf);
24019        Self::arbitrary(&mut unstructured).unwrap_or_default()
24020    }
24021}
24022impl Default for PARAM_MAP_RC_DATA {
24023    fn default() -> Self {
24024        Self::DEFAULT.clone()
24025    }
24026}
24027impl MessageData for PARAM_MAP_RC_DATA {
24028    type Message = MavMessage;
24029    const ID: u32 = 50u32;
24030    const NAME: &'static str = "PARAM_MAP_RC";
24031    const EXTRA_CRC: u8 = 78u8;
24032    const ENCODED_LEN: usize = 37usize;
24033    fn deser(
24034        _version: MavlinkVersion,
24035        __input: &[u8],
24036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24037        let avail_len = __input.len();
24038        let mut payload_buf = [0; Self::ENCODED_LEN];
24039        let mut buf = if avail_len < Self::ENCODED_LEN {
24040            payload_buf[0..avail_len].copy_from_slice(__input);
24041            Bytes::new(&payload_buf)
24042        } else {
24043            Bytes::new(__input)
24044        };
24045        let mut __struct = Self::default();
24046        __struct.param_value0 = buf.get_f32_le()?;
24047        __struct.scale = buf.get_f32_le()?;
24048        __struct.param_value_min = buf.get_f32_le()?;
24049        __struct.param_value_max = buf.get_f32_le()?;
24050        __struct.param_index = buf.get_i16_le()?;
24051        __struct.target_system = buf.get_u8()?;
24052        __struct.target_component = buf.get_u8()?;
24053        let mut tmp = [0_u8; 16usize];
24054        for v in &mut tmp {
24055            *v = buf.get_u8()?;
24056        }
24057        __struct.param_id = CharArray::new(tmp);
24058        __struct.parameter_rc_channel_index = buf.get_u8()?;
24059        Ok(__struct)
24060    }
24061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24062        let mut __tmp = BytesMut::new(bytes);
24063        #[allow(clippy::absurd_extreme_comparisons)]
24064        #[allow(unused_comparisons)]
24065        if __tmp.remaining() < Self::ENCODED_LEN {
24066            panic!(
24067                "buffer is too small (need {} bytes, but got {})",
24068                Self::ENCODED_LEN,
24069                __tmp.remaining(),
24070            )
24071        }
24072        __tmp.put_f32_le(self.param_value0);
24073        __tmp.put_f32_le(self.scale);
24074        __tmp.put_f32_le(self.param_value_min);
24075        __tmp.put_f32_le(self.param_value_max);
24076        __tmp.put_i16_le(self.param_index);
24077        __tmp.put_u8(self.target_system);
24078        __tmp.put_u8(self.target_component);
24079        for val in &self.param_id {
24080            __tmp.put_u8(*val);
24081        }
24082        __tmp.put_u8(self.parameter_rc_channel_index);
24083        if matches!(version, MavlinkVersion::V2) {
24084            let len = __tmp.len();
24085            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24086        } else {
24087            __tmp.len()
24088        }
24089    }
24090}
24091#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24092#[doc = ""]
24093#[doc = "ID: 21"]
24094#[derive(Debug, Clone, PartialEq)]
24095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24097#[cfg_attr(feature = "ts", derive(TS))]
24098#[cfg_attr(feature = "ts", ts(export))]
24099pub struct PARAM_REQUEST_LIST_DATA {
24100    #[doc = "System ID"]
24101    pub target_system: u8,
24102    #[doc = "Component ID"]
24103    pub target_component: u8,
24104}
24105impl PARAM_REQUEST_LIST_DATA {
24106    pub const ENCODED_LEN: usize = 2usize;
24107    pub const DEFAULT: Self = Self {
24108        target_system: 0_u8,
24109        target_component: 0_u8,
24110    };
24111    #[cfg(feature = "arbitrary")]
24112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24113        use arbitrary::{Arbitrary, Unstructured};
24114        let mut buf = [0u8; 1024];
24115        rng.fill_bytes(&mut buf);
24116        let mut unstructured = Unstructured::new(&buf);
24117        Self::arbitrary(&mut unstructured).unwrap_or_default()
24118    }
24119}
24120impl Default for PARAM_REQUEST_LIST_DATA {
24121    fn default() -> Self {
24122        Self::DEFAULT.clone()
24123    }
24124}
24125impl MessageData for PARAM_REQUEST_LIST_DATA {
24126    type Message = MavMessage;
24127    const ID: u32 = 21u32;
24128    const NAME: &'static str = "PARAM_REQUEST_LIST";
24129    const EXTRA_CRC: u8 = 159u8;
24130    const ENCODED_LEN: usize = 2usize;
24131    fn deser(
24132        _version: MavlinkVersion,
24133        __input: &[u8],
24134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24135        let avail_len = __input.len();
24136        let mut payload_buf = [0; Self::ENCODED_LEN];
24137        let mut buf = if avail_len < Self::ENCODED_LEN {
24138            payload_buf[0..avail_len].copy_from_slice(__input);
24139            Bytes::new(&payload_buf)
24140        } else {
24141            Bytes::new(__input)
24142        };
24143        let mut __struct = Self::default();
24144        __struct.target_system = buf.get_u8()?;
24145        __struct.target_component = buf.get_u8()?;
24146        Ok(__struct)
24147    }
24148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24149        let mut __tmp = BytesMut::new(bytes);
24150        #[allow(clippy::absurd_extreme_comparisons)]
24151        #[allow(unused_comparisons)]
24152        if __tmp.remaining() < Self::ENCODED_LEN {
24153            panic!(
24154                "buffer is too small (need {} bytes, but got {})",
24155                Self::ENCODED_LEN,
24156                __tmp.remaining(),
24157            )
24158        }
24159        __tmp.put_u8(self.target_system);
24160        __tmp.put_u8(self.target_component);
24161        if matches!(version, MavlinkVersion::V2) {
24162            let len = __tmp.len();
24163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24164        } else {
24165            __tmp.len()
24166        }
24167    }
24168}
24169#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24170#[doc = ""]
24171#[doc = "ID: 20"]
24172#[derive(Debug, Clone, PartialEq)]
24173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24175#[cfg_attr(feature = "ts", derive(TS))]
24176#[cfg_attr(feature = "ts", ts(export))]
24177pub struct PARAM_REQUEST_READ_DATA {
24178    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24179    pub param_index: i16,
24180    #[doc = "System ID"]
24181    pub target_system: u8,
24182    #[doc = "Component ID"]
24183    pub target_component: u8,
24184    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24185    #[cfg_attr(feature = "ts", ts(type = "string"))]
24186    pub param_id: CharArray<16>,
24187}
24188impl PARAM_REQUEST_READ_DATA {
24189    pub const ENCODED_LEN: usize = 20usize;
24190    pub const DEFAULT: Self = Self {
24191        param_index: 0_i16,
24192        target_system: 0_u8,
24193        target_component: 0_u8,
24194        param_id: CharArray::new([0_u8; 16usize]),
24195    };
24196    #[cfg(feature = "arbitrary")]
24197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24198        use arbitrary::{Arbitrary, Unstructured};
24199        let mut buf = [0u8; 1024];
24200        rng.fill_bytes(&mut buf);
24201        let mut unstructured = Unstructured::new(&buf);
24202        Self::arbitrary(&mut unstructured).unwrap_or_default()
24203    }
24204}
24205impl Default for PARAM_REQUEST_READ_DATA {
24206    fn default() -> Self {
24207        Self::DEFAULT.clone()
24208    }
24209}
24210impl MessageData for PARAM_REQUEST_READ_DATA {
24211    type Message = MavMessage;
24212    const ID: u32 = 20u32;
24213    const NAME: &'static str = "PARAM_REQUEST_READ";
24214    const EXTRA_CRC: u8 = 214u8;
24215    const ENCODED_LEN: usize = 20usize;
24216    fn deser(
24217        _version: MavlinkVersion,
24218        __input: &[u8],
24219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24220        let avail_len = __input.len();
24221        let mut payload_buf = [0; Self::ENCODED_LEN];
24222        let mut buf = if avail_len < Self::ENCODED_LEN {
24223            payload_buf[0..avail_len].copy_from_slice(__input);
24224            Bytes::new(&payload_buf)
24225        } else {
24226            Bytes::new(__input)
24227        };
24228        let mut __struct = Self::default();
24229        __struct.param_index = buf.get_i16_le()?;
24230        __struct.target_system = buf.get_u8()?;
24231        __struct.target_component = buf.get_u8()?;
24232        let mut tmp = [0_u8; 16usize];
24233        for v in &mut tmp {
24234            *v = buf.get_u8()?;
24235        }
24236        __struct.param_id = CharArray::new(tmp);
24237        Ok(__struct)
24238    }
24239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24240        let mut __tmp = BytesMut::new(bytes);
24241        #[allow(clippy::absurd_extreme_comparisons)]
24242        #[allow(unused_comparisons)]
24243        if __tmp.remaining() < Self::ENCODED_LEN {
24244            panic!(
24245                "buffer is too small (need {} bytes, but got {})",
24246                Self::ENCODED_LEN,
24247                __tmp.remaining(),
24248            )
24249        }
24250        __tmp.put_i16_le(self.param_index);
24251        __tmp.put_u8(self.target_system);
24252        __tmp.put_u8(self.target_component);
24253        for val in &self.param_id {
24254            __tmp.put_u8(*val);
24255        }
24256        if matches!(version, MavlinkVersion::V2) {
24257            let len = __tmp.len();
24258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24259        } else {
24260            __tmp.len()
24261        }
24262    }
24263}
24264#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24265#[doc = ""]
24266#[doc = "ID: 23"]
24267#[derive(Debug, Clone, PartialEq)]
24268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24270#[cfg_attr(feature = "ts", derive(TS))]
24271#[cfg_attr(feature = "ts", ts(export))]
24272pub struct PARAM_SET_DATA {
24273    #[doc = "Onboard parameter value"]
24274    pub param_value: f32,
24275    #[doc = "System ID"]
24276    pub target_system: u8,
24277    #[doc = "Component ID"]
24278    pub target_component: u8,
24279    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24280    #[cfg_attr(feature = "ts", ts(type = "string"))]
24281    pub param_id: CharArray<16>,
24282    #[doc = "Onboard parameter type."]
24283    pub param_type: MavParamType,
24284}
24285impl PARAM_SET_DATA {
24286    pub const ENCODED_LEN: usize = 23usize;
24287    pub const DEFAULT: Self = Self {
24288        param_value: 0.0_f32,
24289        target_system: 0_u8,
24290        target_component: 0_u8,
24291        param_id: CharArray::new([0_u8; 16usize]),
24292        param_type: MavParamType::DEFAULT,
24293    };
24294    #[cfg(feature = "arbitrary")]
24295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24296        use arbitrary::{Arbitrary, Unstructured};
24297        let mut buf = [0u8; 1024];
24298        rng.fill_bytes(&mut buf);
24299        let mut unstructured = Unstructured::new(&buf);
24300        Self::arbitrary(&mut unstructured).unwrap_or_default()
24301    }
24302}
24303impl Default for PARAM_SET_DATA {
24304    fn default() -> Self {
24305        Self::DEFAULT.clone()
24306    }
24307}
24308impl MessageData for PARAM_SET_DATA {
24309    type Message = MavMessage;
24310    const ID: u32 = 23u32;
24311    const NAME: &'static str = "PARAM_SET";
24312    const EXTRA_CRC: u8 = 168u8;
24313    const ENCODED_LEN: usize = 23usize;
24314    fn deser(
24315        _version: MavlinkVersion,
24316        __input: &[u8],
24317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24318        let avail_len = __input.len();
24319        let mut payload_buf = [0; Self::ENCODED_LEN];
24320        let mut buf = if avail_len < Self::ENCODED_LEN {
24321            payload_buf[0..avail_len].copy_from_slice(__input);
24322            Bytes::new(&payload_buf)
24323        } else {
24324            Bytes::new(__input)
24325        };
24326        let mut __struct = Self::default();
24327        __struct.param_value = buf.get_f32_le()?;
24328        __struct.target_system = buf.get_u8()?;
24329        __struct.target_component = buf.get_u8()?;
24330        let mut tmp = [0_u8; 16usize];
24331        for v in &mut tmp {
24332            *v = buf.get_u8()?;
24333        }
24334        __struct.param_id = CharArray::new(tmp);
24335        let tmp = buf.get_u8()?;
24336        __struct.param_type =
24337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24338                enum_type: "MavParamType",
24339                value: tmp as u64,
24340            })?;
24341        Ok(__struct)
24342    }
24343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24344        let mut __tmp = BytesMut::new(bytes);
24345        #[allow(clippy::absurd_extreme_comparisons)]
24346        #[allow(unused_comparisons)]
24347        if __tmp.remaining() < Self::ENCODED_LEN {
24348            panic!(
24349                "buffer is too small (need {} bytes, but got {})",
24350                Self::ENCODED_LEN,
24351                __tmp.remaining(),
24352            )
24353        }
24354        __tmp.put_f32_le(self.param_value);
24355        __tmp.put_u8(self.target_system);
24356        __tmp.put_u8(self.target_component);
24357        for val in &self.param_id {
24358            __tmp.put_u8(*val);
24359        }
24360        __tmp.put_u8(self.param_type as u8);
24361        if matches!(version, MavlinkVersion::V2) {
24362            let len = __tmp.len();
24363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24364        } else {
24365            __tmp.len()
24366        }
24367    }
24368}
24369#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24370#[doc = ""]
24371#[doc = "ID: 22"]
24372#[derive(Debug, Clone, PartialEq)]
24373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24375#[cfg_attr(feature = "ts", derive(TS))]
24376#[cfg_attr(feature = "ts", ts(export))]
24377pub struct PARAM_VALUE_DATA {
24378    #[doc = "Onboard parameter value"]
24379    pub param_value: f32,
24380    #[doc = "Total number of onboard parameters"]
24381    pub param_count: u16,
24382    #[doc = "Index of this onboard parameter"]
24383    pub param_index: u16,
24384    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24385    #[cfg_attr(feature = "ts", ts(type = "string"))]
24386    pub param_id: CharArray<16>,
24387    #[doc = "Onboard parameter type."]
24388    pub param_type: MavParamType,
24389}
24390impl PARAM_VALUE_DATA {
24391    pub const ENCODED_LEN: usize = 25usize;
24392    pub const DEFAULT: Self = Self {
24393        param_value: 0.0_f32,
24394        param_count: 0_u16,
24395        param_index: 0_u16,
24396        param_id: CharArray::new([0_u8; 16usize]),
24397        param_type: MavParamType::DEFAULT,
24398    };
24399    #[cfg(feature = "arbitrary")]
24400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24401        use arbitrary::{Arbitrary, Unstructured};
24402        let mut buf = [0u8; 1024];
24403        rng.fill_bytes(&mut buf);
24404        let mut unstructured = Unstructured::new(&buf);
24405        Self::arbitrary(&mut unstructured).unwrap_or_default()
24406    }
24407}
24408impl Default for PARAM_VALUE_DATA {
24409    fn default() -> Self {
24410        Self::DEFAULT.clone()
24411    }
24412}
24413impl MessageData for PARAM_VALUE_DATA {
24414    type Message = MavMessage;
24415    const ID: u32 = 22u32;
24416    const NAME: &'static str = "PARAM_VALUE";
24417    const EXTRA_CRC: u8 = 220u8;
24418    const ENCODED_LEN: usize = 25usize;
24419    fn deser(
24420        _version: MavlinkVersion,
24421        __input: &[u8],
24422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24423        let avail_len = __input.len();
24424        let mut payload_buf = [0; Self::ENCODED_LEN];
24425        let mut buf = if avail_len < Self::ENCODED_LEN {
24426            payload_buf[0..avail_len].copy_from_slice(__input);
24427            Bytes::new(&payload_buf)
24428        } else {
24429            Bytes::new(__input)
24430        };
24431        let mut __struct = Self::default();
24432        __struct.param_value = buf.get_f32_le()?;
24433        __struct.param_count = buf.get_u16_le()?;
24434        __struct.param_index = buf.get_u16_le()?;
24435        let mut tmp = [0_u8; 16usize];
24436        for v in &mut tmp {
24437            *v = buf.get_u8()?;
24438        }
24439        __struct.param_id = CharArray::new(tmp);
24440        let tmp = buf.get_u8()?;
24441        __struct.param_type =
24442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24443                enum_type: "MavParamType",
24444                value: tmp as u64,
24445            })?;
24446        Ok(__struct)
24447    }
24448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24449        let mut __tmp = BytesMut::new(bytes);
24450        #[allow(clippy::absurd_extreme_comparisons)]
24451        #[allow(unused_comparisons)]
24452        if __tmp.remaining() < Self::ENCODED_LEN {
24453            panic!(
24454                "buffer is too small (need {} bytes, but got {})",
24455                Self::ENCODED_LEN,
24456                __tmp.remaining(),
24457            )
24458        }
24459        __tmp.put_f32_le(self.param_value);
24460        __tmp.put_u16_le(self.param_count);
24461        __tmp.put_u16_le(self.param_index);
24462        for val in &self.param_id {
24463            __tmp.put_u8(*val);
24464        }
24465        __tmp.put_u8(self.param_type as u8);
24466        if matches!(version, MavlinkVersion::V2) {
24467            let len = __tmp.len();
24468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24469        } else {
24470            __tmp.len()
24471        }
24472    }
24473}
24474#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24475#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24476#[doc = ""]
24477#[doc = "ID: 4"]
24478#[derive(Debug, Clone, PartialEq)]
24479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24481#[cfg_attr(feature = "ts", derive(TS))]
24482#[cfg_attr(feature = "ts", ts(export))]
24483pub struct PING_DATA {
24484    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24485    pub time_usec: u64,
24486    #[doc = "PING sequence"]
24487    pub seq: u32,
24488    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24489    pub target_system: u8,
24490    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24491    pub target_component: u8,
24492}
24493impl PING_DATA {
24494    pub const ENCODED_LEN: usize = 14usize;
24495    pub const DEFAULT: Self = Self {
24496        time_usec: 0_u64,
24497        seq: 0_u32,
24498        target_system: 0_u8,
24499        target_component: 0_u8,
24500    };
24501    #[cfg(feature = "arbitrary")]
24502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24503        use arbitrary::{Arbitrary, Unstructured};
24504        let mut buf = [0u8; 1024];
24505        rng.fill_bytes(&mut buf);
24506        let mut unstructured = Unstructured::new(&buf);
24507        Self::arbitrary(&mut unstructured).unwrap_or_default()
24508    }
24509}
24510impl Default for PING_DATA {
24511    fn default() -> Self {
24512        Self::DEFAULT.clone()
24513    }
24514}
24515impl MessageData for PING_DATA {
24516    type Message = MavMessage;
24517    const ID: u32 = 4u32;
24518    const NAME: &'static str = "PING";
24519    const EXTRA_CRC: u8 = 237u8;
24520    const ENCODED_LEN: usize = 14usize;
24521    fn deser(
24522        _version: MavlinkVersion,
24523        __input: &[u8],
24524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24525        let avail_len = __input.len();
24526        let mut payload_buf = [0; Self::ENCODED_LEN];
24527        let mut buf = if avail_len < Self::ENCODED_LEN {
24528            payload_buf[0..avail_len].copy_from_slice(__input);
24529            Bytes::new(&payload_buf)
24530        } else {
24531            Bytes::new(__input)
24532        };
24533        let mut __struct = Self::default();
24534        __struct.time_usec = buf.get_u64_le()?;
24535        __struct.seq = buf.get_u32_le()?;
24536        __struct.target_system = buf.get_u8()?;
24537        __struct.target_component = buf.get_u8()?;
24538        Ok(__struct)
24539    }
24540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24541        let mut __tmp = BytesMut::new(bytes);
24542        #[allow(clippy::absurd_extreme_comparisons)]
24543        #[allow(unused_comparisons)]
24544        if __tmp.remaining() < Self::ENCODED_LEN {
24545            panic!(
24546                "buffer is too small (need {} bytes, but got {})",
24547                Self::ENCODED_LEN,
24548                __tmp.remaining(),
24549            )
24550        }
24551        __tmp.put_u64_le(self.time_usec);
24552        __tmp.put_u32_le(self.seq);
24553        __tmp.put_u8(self.target_system);
24554        __tmp.put_u8(self.target_component);
24555        if matches!(version, MavlinkVersion::V2) {
24556            let len = __tmp.len();
24557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24558        } else {
24559            __tmp.len()
24560        }
24561    }
24562}
24563#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24564#[doc = "Control vehicle tone generation (buzzer)."]
24565#[doc = ""]
24566#[doc = "ID: 258"]
24567#[derive(Debug, Clone, PartialEq)]
24568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24570#[cfg_attr(feature = "ts", derive(TS))]
24571#[cfg_attr(feature = "ts", ts(export))]
24572pub struct PLAY_TUNE_DATA {
24573    #[doc = "System ID"]
24574    pub target_system: u8,
24575    #[doc = "Component ID"]
24576    pub target_component: u8,
24577    #[doc = "tune in board specific format"]
24578    #[cfg_attr(feature = "ts", ts(type = "string"))]
24579    pub tune: CharArray<30>,
24580    #[doc = "tune extension (appended to tune)"]
24581    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24582    #[cfg_attr(feature = "ts", ts(type = "string"))]
24583    pub tune2: CharArray<200>,
24584}
24585impl PLAY_TUNE_DATA {
24586    pub const ENCODED_LEN: usize = 232usize;
24587    pub const DEFAULT: Self = Self {
24588        target_system: 0_u8,
24589        target_component: 0_u8,
24590        tune: CharArray::new([0_u8; 30usize]),
24591        tune2: CharArray::new([0_u8; 200usize]),
24592    };
24593    #[cfg(feature = "arbitrary")]
24594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24595        use arbitrary::{Arbitrary, Unstructured};
24596        let mut buf = [0u8; 1024];
24597        rng.fill_bytes(&mut buf);
24598        let mut unstructured = Unstructured::new(&buf);
24599        Self::arbitrary(&mut unstructured).unwrap_or_default()
24600    }
24601}
24602impl Default for PLAY_TUNE_DATA {
24603    fn default() -> Self {
24604        Self::DEFAULT.clone()
24605    }
24606}
24607impl MessageData for PLAY_TUNE_DATA {
24608    type Message = MavMessage;
24609    const ID: u32 = 258u32;
24610    const NAME: &'static str = "PLAY_TUNE";
24611    const EXTRA_CRC: u8 = 187u8;
24612    const ENCODED_LEN: usize = 232usize;
24613    fn deser(
24614        _version: MavlinkVersion,
24615        __input: &[u8],
24616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24617        let avail_len = __input.len();
24618        let mut payload_buf = [0; Self::ENCODED_LEN];
24619        let mut buf = if avail_len < Self::ENCODED_LEN {
24620            payload_buf[0..avail_len].copy_from_slice(__input);
24621            Bytes::new(&payload_buf)
24622        } else {
24623            Bytes::new(__input)
24624        };
24625        let mut __struct = Self::default();
24626        __struct.target_system = buf.get_u8()?;
24627        __struct.target_component = buf.get_u8()?;
24628        let mut tmp = [0_u8; 30usize];
24629        for v in &mut tmp {
24630            *v = buf.get_u8()?;
24631        }
24632        __struct.tune = CharArray::new(tmp);
24633        let mut tmp = [0_u8; 200usize];
24634        for v in &mut tmp {
24635            *v = buf.get_u8()?;
24636        }
24637        __struct.tune2 = CharArray::new(tmp);
24638        Ok(__struct)
24639    }
24640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24641        let mut __tmp = BytesMut::new(bytes);
24642        #[allow(clippy::absurd_extreme_comparisons)]
24643        #[allow(unused_comparisons)]
24644        if __tmp.remaining() < Self::ENCODED_LEN {
24645            panic!(
24646                "buffer is too small (need {} bytes, but got {})",
24647                Self::ENCODED_LEN,
24648                __tmp.remaining(),
24649            )
24650        }
24651        __tmp.put_u8(self.target_system);
24652        __tmp.put_u8(self.target_component);
24653        for val in &self.tune {
24654            __tmp.put_u8(*val);
24655        }
24656        if matches!(version, MavlinkVersion::V2) {
24657            for val in &self.tune2 {
24658                __tmp.put_u8(*val);
24659            }
24660            let len = __tmp.len();
24661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24662        } else {
24663            __tmp.len()
24664        }
24665    }
24666}
24667#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24668#[doc = ""]
24669#[doc = "ID: 400"]
24670#[derive(Debug, Clone, PartialEq)]
24671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24673#[cfg_attr(feature = "ts", derive(TS))]
24674#[cfg_attr(feature = "ts", ts(export))]
24675pub struct PLAY_TUNE_V2_DATA {
24676    #[doc = "Tune format"]
24677    pub format: TuneFormat,
24678    #[doc = "System ID"]
24679    pub target_system: u8,
24680    #[doc = "Component ID"]
24681    pub target_component: u8,
24682    #[doc = "Tune definition as a NULL-terminated string."]
24683    #[cfg_attr(feature = "ts", ts(type = "string"))]
24684    pub tune: CharArray<248>,
24685}
24686impl PLAY_TUNE_V2_DATA {
24687    pub const ENCODED_LEN: usize = 254usize;
24688    pub const DEFAULT: Self = Self {
24689        format: TuneFormat::DEFAULT,
24690        target_system: 0_u8,
24691        target_component: 0_u8,
24692        tune: CharArray::new([0_u8; 248usize]),
24693    };
24694    #[cfg(feature = "arbitrary")]
24695    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24696        use arbitrary::{Arbitrary, Unstructured};
24697        let mut buf = [0u8; 1024];
24698        rng.fill_bytes(&mut buf);
24699        let mut unstructured = Unstructured::new(&buf);
24700        Self::arbitrary(&mut unstructured).unwrap_or_default()
24701    }
24702}
24703impl Default for PLAY_TUNE_V2_DATA {
24704    fn default() -> Self {
24705        Self::DEFAULT.clone()
24706    }
24707}
24708impl MessageData for PLAY_TUNE_V2_DATA {
24709    type Message = MavMessage;
24710    const ID: u32 = 400u32;
24711    const NAME: &'static str = "PLAY_TUNE_V2";
24712    const EXTRA_CRC: u8 = 110u8;
24713    const ENCODED_LEN: usize = 254usize;
24714    fn deser(
24715        _version: MavlinkVersion,
24716        __input: &[u8],
24717    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24718        let avail_len = __input.len();
24719        let mut payload_buf = [0; Self::ENCODED_LEN];
24720        let mut buf = if avail_len < Self::ENCODED_LEN {
24721            payload_buf[0..avail_len].copy_from_slice(__input);
24722            Bytes::new(&payload_buf)
24723        } else {
24724            Bytes::new(__input)
24725        };
24726        let mut __struct = Self::default();
24727        let tmp = buf.get_u32_le()?;
24728        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24729            ::mavlink_core::error::ParserError::InvalidEnum {
24730                enum_type: "TuneFormat",
24731                value: tmp as u64,
24732            },
24733        )?;
24734        __struct.target_system = buf.get_u8()?;
24735        __struct.target_component = buf.get_u8()?;
24736        let mut tmp = [0_u8; 248usize];
24737        for v in &mut tmp {
24738            *v = buf.get_u8()?;
24739        }
24740        __struct.tune = CharArray::new(tmp);
24741        Ok(__struct)
24742    }
24743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24744        let mut __tmp = BytesMut::new(bytes);
24745        #[allow(clippy::absurd_extreme_comparisons)]
24746        #[allow(unused_comparisons)]
24747        if __tmp.remaining() < Self::ENCODED_LEN {
24748            panic!(
24749                "buffer is too small (need {} bytes, but got {})",
24750                Self::ENCODED_LEN,
24751                __tmp.remaining(),
24752            )
24753        }
24754        __tmp.put_u32_le(self.format as u32);
24755        __tmp.put_u8(self.target_system);
24756        __tmp.put_u8(self.target_component);
24757        for val in &self.tune {
24758            __tmp.put_u8(*val);
24759        }
24760        if matches!(version, MavlinkVersion::V2) {
24761            let len = __tmp.len();
24762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24763        } else {
24764            __tmp.len()
24765        }
24766    }
24767}
24768#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24769#[doc = ""]
24770#[doc = "ID: 87"]
24771#[derive(Debug, Clone, PartialEq)]
24772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24774#[cfg_attr(feature = "ts", derive(TS))]
24775#[cfg_attr(feature = "ts", ts(export))]
24776pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24777    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24778    pub time_boot_ms: u32,
24779    #[doc = "Latitude in WGS84 frame"]
24780    pub lat_int: i32,
24781    #[doc = "Longitude in WGS84 frame"]
24782    pub lon_int: i32,
24783    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24784    pub alt: f32,
24785    #[doc = "X velocity in NED frame"]
24786    pub vx: f32,
24787    #[doc = "Y velocity in NED frame"]
24788    pub vy: f32,
24789    #[doc = "Z velocity in NED frame"]
24790    pub vz: f32,
24791    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24792    pub afx: f32,
24793    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24794    pub afy: f32,
24795    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24796    pub afz: f32,
24797    #[doc = "yaw setpoint"]
24798    pub yaw: f32,
24799    #[doc = "yaw rate setpoint"]
24800    pub yaw_rate: f32,
24801    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24802    pub type_mask: PositionTargetTypemask,
24803    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24804    pub coordinate_frame: MavFrame,
24805}
24806impl POSITION_TARGET_GLOBAL_INT_DATA {
24807    pub const ENCODED_LEN: usize = 51usize;
24808    pub const DEFAULT: Self = Self {
24809        time_boot_ms: 0_u32,
24810        lat_int: 0_i32,
24811        lon_int: 0_i32,
24812        alt: 0.0_f32,
24813        vx: 0.0_f32,
24814        vy: 0.0_f32,
24815        vz: 0.0_f32,
24816        afx: 0.0_f32,
24817        afy: 0.0_f32,
24818        afz: 0.0_f32,
24819        yaw: 0.0_f32,
24820        yaw_rate: 0.0_f32,
24821        type_mask: PositionTargetTypemask::DEFAULT,
24822        coordinate_frame: MavFrame::DEFAULT,
24823    };
24824    #[cfg(feature = "arbitrary")]
24825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24826        use arbitrary::{Arbitrary, Unstructured};
24827        let mut buf = [0u8; 1024];
24828        rng.fill_bytes(&mut buf);
24829        let mut unstructured = Unstructured::new(&buf);
24830        Self::arbitrary(&mut unstructured).unwrap_or_default()
24831    }
24832}
24833impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24834    fn default() -> Self {
24835        Self::DEFAULT.clone()
24836    }
24837}
24838impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24839    type Message = MavMessage;
24840    const ID: u32 = 87u32;
24841    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24842    const EXTRA_CRC: u8 = 150u8;
24843    const ENCODED_LEN: usize = 51usize;
24844    fn deser(
24845        _version: MavlinkVersion,
24846        __input: &[u8],
24847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24848        let avail_len = __input.len();
24849        let mut payload_buf = [0; Self::ENCODED_LEN];
24850        let mut buf = if avail_len < Self::ENCODED_LEN {
24851            payload_buf[0..avail_len].copy_from_slice(__input);
24852            Bytes::new(&payload_buf)
24853        } else {
24854            Bytes::new(__input)
24855        };
24856        let mut __struct = Self::default();
24857        __struct.time_boot_ms = buf.get_u32_le()?;
24858        __struct.lat_int = buf.get_i32_le()?;
24859        __struct.lon_int = buf.get_i32_le()?;
24860        __struct.alt = buf.get_f32_le()?;
24861        __struct.vx = buf.get_f32_le()?;
24862        __struct.vy = buf.get_f32_le()?;
24863        __struct.vz = buf.get_f32_le()?;
24864        __struct.afx = buf.get_f32_le()?;
24865        __struct.afy = buf.get_f32_le()?;
24866        __struct.afz = buf.get_f32_le()?;
24867        __struct.yaw = buf.get_f32_le()?;
24868        __struct.yaw_rate = buf.get_f32_le()?;
24869        let tmp = buf.get_u16_le()?;
24870        __struct.type_mask =
24871            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24872                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24873                    flag_type: "PositionTargetTypemask",
24874                    value: tmp as u64,
24875                })?;
24876        let tmp = buf.get_u8()?;
24877        __struct.coordinate_frame =
24878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24879                enum_type: "MavFrame",
24880                value: tmp as u64,
24881            })?;
24882        Ok(__struct)
24883    }
24884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24885        let mut __tmp = BytesMut::new(bytes);
24886        #[allow(clippy::absurd_extreme_comparisons)]
24887        #[allow(unused_comparisons)]
24888        if __tmp.remaining() < Self::ENCODED_LEN {
24889            panic!(
24890                "buffer is too small (need {} bytes, but got {})",
24891                Self::ENCODED_LEN,
24892                __tmp.remaining(),
24893            )
24894        }
24895        __tmp.put_u32_le(self.time_boot_ms);
24896        __tmp.put_i32_le(self.lat_int);
24897        __tmp.put_i32_le(self.lon_int);
24898        __tmp.put_f32_le(self.alt);
24899        __tmp.put_f32_le(self.vx);
24900        __tmp.put_f32_le(self.vy);
24901        __tmp.put_f32_le(self.vz);
24902        __tmp.put_f32_le(self.afx);
24903        __tmp.put_f32_le(self.afy);
24904        __tmp.put_f32_le(self.afz);
24905        __tmp.put_f32_le(self.yaw);
24906        __tmp.put_f32_le(self.yaw_rate);
24907        __tmp.put_u16_le(self.type_mask.bits() as u16);
24908        __tmp.put_u8(self.coordinate_frame as u8);
24909        if matches!(version, MavlinkVersion::V2) {
24910            let len = __tmp.len();
24911            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24912        } else {
24913            __tmp.len()
24914        }
24915    }
24916}
24917#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24918#[doc = ""]
24919#[doc = "ID: 85"]
24920#[derive(Debug, Clone, PartialEq)]
24921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24923#[cfg_attr(feature = "ts", derive(TS))]
24924#[cfg_attr(feature = "ts", ts(export))]
24925pub struct POSITION_TARGET_LOCAL_NED_DATA {
24926    #[doc = "Timestamp (time since system boot)."]
24927    pub time_boot_ms: u32,
24928    #[doc = "X Position in NED frame"]
24929    pub x: f32,
24930    #[doc = "Y Position in NED frame"]
24931    pub y: f32,
24932    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24933    pub z: f32,
24934    #[doc = "X velocity in NED frame"]
24935    pub vx: f32,
24936    #[doc = "Y velocity in NED frame"]
24937    pub vy: f32,
24938    #[doc = "Z velocity in NED frame"]
24939    pub vz: f32,
24940    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24941    pub afx: f32,
24942    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24943    pub afy: f32,
24944    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24945    pub afz: f32,
24946    #[doc = "yaw setpoint"]
24947    pub yaw: f32,
24948    #[doc = "yaw rate setpoint"]
24949    pub yaw_rate: f32,
24950    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24951    pub type_mask: PositionTargetTypemask,
24952    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24953    pub coordinate_frame: MavFrame,
24954}
24955impl POSITION_TARGET_LOCAL_NED_DATA {
24956    pub const ENCODED_LEN: usize = 51usize;
24957    pub const DEFAULT: Self = Self {
24958        time_boot_ms: 0_u32,
24959        x: 0.0_f32,
24960        y: 0.0_f32,
24961        z: 0.0_f32,
24962        vx: 0.0_f32,
24963        vy: 0.0_f32,
24964        vz: 0.0_f32,
24965        afx: 0.0_f32,
24966        afy: 0.0_f32,
24967        afz: 0.0_f32,
24968        yaw: 0.0_f32,
24969        yaw_rate: 0.0_f32,
24970        type_mask: PositionTargetTypemask::DEFAULT,
24971        coordinate_frame: MavFrame::DEFAULT,
24972    };
24973    #[cfg(feature = "arbitrary")]
24974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24975        use arbitrary::{Arbitrary, Unstructured};
24976        let mut buf = [0u8; 1024];
24977        rng.fill_bytes(&mut buf);
24978        let mut unstructured = Unstructured::new(&buf);
24979        Self::arbitrary(&mut unstructured).unwrap_or_default()
24980    }
24981}
24982impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24983    fn default() -> Self {
24984        Self::DEFAULT.clone()
24985    }
24986}
24987impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24988    type Message = MavMessage;
24989    const ID: u32 = 85u32;
24990    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24991    const EXTRA_CRC: u8 = 140u8;
24992    const ENCODED_LEN: usize = 51usize;
24993    fn deser(
24994        _version: MavlinkVersion,
24995        __input: &[u8],
24996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24997        let avail_len = __input.len();
24998        let mut payload_buf = [0; Self::ENCODED_LEN];
24999        let mut buf = if avail_len < Self::ENCODED_LEN {
25000            payload_buf[0..avail_len].copy_from_slice(__input);
25001            Bytes::new(&payload_buf)
25002        } else {
25003            Bytes::new(__input)
25004        };
25005        let mut __struct = Self::default();
25006        __struct.time_boot_ms = buf.get_u32_le()?;
25007        __struct.x = buf.get_f32_le()?;
25008        __struct.y = buf.get_f32_le()?;
25009        __struct.z = buf.get_f32_le()?;
25010        __struct.vx = buf.get_f32_le()?;
25011        __struct.vy = buf.get_f32_le()?;
25012        __struct.vz = buf.get_f32_le()?;
25013        __struct.afx = buf.get_f32_le()?;
25014        __struct.afy = buf.get_f32_le()?;
25015        __struct.afz = buf.get_f32_le()?;
25016        __struct.yaw = buf.get_f32_le()?;
25017        __struct.yaw_rate = buf.get_f32_le()?;
25018        let tmp = buf.get_u16_le()?;
25019        __struct.type_mask =
25020            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25021                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25022                    flag_type: "PositionTargetTypemask",
25023                    value: tmp as u64,
25024                })?;
25025        let tmp = buf.get_u8()?;
25026        __struct.coordinate_frame =
25027            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25028                enum_type: "MavFrame",
25029                value: tmp as u64,
25030            })?;
25031        Ok(__struct)
25032    }
25033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25034        let mut __tmp = BytesMut::new(bytes);
25035        #[allow(clippy::absurd_extreme_comparisons)]
25036        #[allow(unused_comparisons)]
25037        if __tmp.remaining() < Self::ENCODED_LEN {
25038            panic!(
25039                "buffer is too small (need {} bytes, but got {})",
25040                Self::ENCODED_LEN,
25041                __tmp.remaining(),
25042            )
25043        }
25044        __tmp.put_u32_le(self.time_boot_ms);
25045        __tmp.put_f32_le(self.x);
25046        __tmp.put_f32_le(self.y);
25047        __tmp.put_f32_le(self.z);
25048        __tmp.put_f32_le(self.vx);
25049        __tmp.put_f32_le(self.vy);
25050        __tmp.put_f32_le(self.vz);
25051        __tmp.put_f32_le(self.afx);
25052        __tmp.put_f32_le(self.afy);
25053        __tmp.put_f32_le(self.afz);
25054        __tmp.put_f32_le(self.yaw);
25055        __tmp.put_f32_le(self.yaw_rate);
25056        __tmp.put_u16_le(self.type_mask.bits() as u16);
25057        __tmp.put_u8(self.coordinate_frame as u8);
25058        if matches!(version, MavlinkVersion::V2) {
25059            let len = __tmp.len();
25060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25061        } else {
25062            __tmp.len()
25063        }
25064    }
25065}
25066#[doc = "Power supply status."]
25067#[doc = ""]
25068#[doc = "ID: 125"]
25069#[derive(Debug, Clone, PartialEq)]
25070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25072#[cfg_attr(feature = "ts", derive(TS))]
25073#[cfg_attr(feature = "ts", ts(export))]
25074pub struct POWER_STATUS_DATA {
25075    #[doc = "5V rail voltage."]
25076    pub Vcc: u16,
25077    #[doc = "Servo rail voltage."]
25078    pub Vservo: u16,
25079    #[doc = "Bitmap of power supply status flags."]
25080    pub flags: MavPowerStatus,
25081}
25082impl POWER_STATUS_DATA {
25083    pub const ENCODED_LEN: usize = 6usize;
25084    pub const DEFAULT: Self = Self {
25085        Vcc: 0_u16,
25086        Vservo: 0_u16,
25087        flags: MavPowerStatus::DEFAULT,
25088    };
25089    #[cfg(feature = "arbitrary")]
25090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25091        use arbitrary::{Arbitrary, Unstructured};
25092        let mut buf = [0u8; 1024];
25093        rng.fill_bytes(&mut buf);
25094        let mut unstructured = Unstructured::new(&buf);
25095        Self::arbitrary(&mut unstructured).unwrap_or_default()
25096    }
25097}
25098impl Default for POWER_STATUS_DATA {
25099    fn default() -> Self {
25100        Self::DEFAULT.clone()
25101    }
25102}
25103impl MessageData for POWER_STATUS_DATA {
25104    type Message = MavMessage;
25105    const ID: u32 = 125u32;
25106    const NAME: &'static str = "POWER_STATUS";
25107    const EXTRA_CRC: u8 = 203u8;
25108    const ENCODED_LEN: usize = 6usize;
25109    fn deser(
25110        _version: MavlinkVersion,
25111        __input: &[u8],
25112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25113        let avail_len = __input.len();
25114        let mut payload_buf = [0; Self::ENCODED_LEN];
25115        let mut buf = if avail_len < Self::ENCODED_LEN {
25116            payload_buf[0..avail_len].copy_from_slice(__input);
25117            Bytes::new(&payload_buf)
25118        } else {
25119            Bytes::new(__input)
25120        };
25121        let mut __struct = Self::default();
25122        __struct.Vcc = buf.get_u16_le()?;
25123        __struct.Vservo = buf.get_u16_le()?;
25124        let tmp = buf.get_u16_le()?;
25125        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
25126            ::mavlink_core::error::ParserError::InvalidFlag {
25127                flag_type: "MavPowerStatus",
25128                value: tmp as u64,
25129            },
25130        )?;
25131        Ok(__struct)
25132    }
25133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25134        let mut __tmp = BytesMut::new(bytes);
25135        #[allow(clippy::absurd_extreme_comparisons)]
25136        #[allow(unused_comparisons)]
25137        if __tmp.remaining() < Self::ENCODED_LEN {
25138            panic!(
25139                "buffer is too small (need {} bytes, but got {})",
25140                Self::ENCODED_LEN,
25141                __tmp.remaining(),
25142            )
25143        }
25144        __tmp.put_u16_le(self.Vcc);
25145        __tmp.put_u16_le(self.Vservo);
25146        __tmp.put_u16_le(self.flags.bits() as u16);
25147        if matches!(version, MavlinkVersion::V2) {
25148            let len = __tmp.len();
25149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25150        } else {
25151            __tmp.len()
25152        }
25153    }
25154}
25155#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25156#[doc = ""]
25157#[doc = "ID: 300"]
25158#[derive(Debug, Clone, PartialEq)]
25159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25161#[cfg_attr(feature = "ts", derive(TS))]
25162#[cfg_attr(feature = "ts", ts(export))]
25163pub struct PROTOCOL_VERSION_DATA {
25164    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25165    pub version: u16,
25166    #[doc = "Minimum MAVLink version supported"]
25167    pub min_version: u16,
25168    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25169    pub max_version: u16,
25170    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25171    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25172    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25173    pub spec_version_hash: [u8; 8],
25174    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25176    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25177    pub library_version_hash: [u8; 8],
25178}
25179impl PROTOCOL_VERSION_DATA {
25180    pub const ENCODED_LEN: usize = 22usize;
25181    pub const DEFAULT: Self = Self {
25182        version: 0_u16,
25183        min_version: 0_u16,
25184        max_version: 0_u16,
25185        spec_version_hash: [0_u8; 8usize],
25186        library_version_hash: [0_u8; 8usize],
25187    };
25188    #[cfg(feature = "arbitrary")]
25189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25190        use arbitrary::{Arbitrary, Unstructured};
25191        let mut buf = [0u8; 1024];
25192        rng.fill_bytes(&mut buf);
25193        let mut unstructured = Unstructured::new(&buf);
25194        Self::arbitrary(&mut unstructured).unwrap_or_default()
25195    }
25196}
25197impl Default for PROTOCOL_VERSION_DATA {
25198    fn default() -> Self {
25199        Self::DEFAULT.clone()
25200    }
25201}
25202impl MessageData for PROTOCOL_VERSION_DATA {
25203    type Message = MavMessage;
25204    const ID: u32 = 300u32;
25205    const NAME: &'static str = "PROTOCOL_VERSION";
25206    const EXTRA_CRC: u8 = 217u8;
25207    const ENCODED_LEN: usize = 22usize;
25208    fn deser(
25209        _version: MavlinkVersion,
25210        __input: &[u8],
25211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25212        let avail_len = __input.len();
25213        let mut payload_buf = [0; Self::ENCODED_LEN];
25214        let mut buf = if avail_len < Self::ENCODED_LEN {
25215            payload_buf[0..avail_len].copy_from_slice(__input);
25216            Bytes::new(&payload_buf)
25217        } else {
25218            Bytes::new(__input)
25219        };
25220        let mut __struct = Self::default();
25221        __struct.version = buf.get_u16_le()?;
25222        __struct.min_version = buf.get_u16_le()?;
25223        __struct.max_version = buf.get_u16_le()?;
25224        for v in &mut __struct.spec_version_hash {
25225            let val = buf.get_u8()?;
25226            *v = val;
25227        }
25228        for v in &mut __struct.library_version_hash {
25229            let val = buf.get_u8()?;
25230            *v = val;
25231        }
25232        Ok(__struct)
25233    }
25234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25235        let mut __tmp = BytesMut::new(bytes);
25236        #[allow(clippy::absurd_extreme_comparisons)]
25237        #[allow(unused_comparisons)]
25238        if __tmp.remaining() < Self::ENCODED_LEN {
25239            panic!(
25240                "buffer is too small (need {} bytes, but got {})",
25241                Self::ENCODED_LEN,
25242                __tmp.remaining(),
25243            )
25244        }
25245        __tmp.put_u16_le(self.version);
25246        __tmp.put_u16_le(self.min_version);
25247        __tmp.put_u16_le(self.max_version);
25248        for val in &self.spec_version_hash {
25249            __tmp.put_u8(*val);
25250        }
25251        for val in &self.library_version_hash {
25252            __tmp.put_u8(*val);
25253        }
25254        if matches!(version, MavlinkVersion::V2) {
25255            let len = __tmp.len();
25256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25257        } else {
25258            __tmp.len()
25259        }
25260    }
25261}
25262#[doc = "Status generated by radio and injected into MAVLink stream."]
25263#[doc = ""]
25264#[doc = "ID: 109"]
25265#[derive(Debug, Clone, PartialEq)]
25266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25268#[cfg_attr(feature = "ts", derive(TS))]
25269#[cfg_attr(feature = "ts", ts(export))]
25270pub struct RADIO_STATUS_DATA {
25271    #[doc = "Count of radio packet receive errors (since boot)."]
25272    pub rxerrors: u16,
25273    #[doc = "Count of error corrected radio packets (since boot)."]
25274    pub fixed: u16,
25275    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25276    pub rssi: u8,
25277    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25278    pub remrssi: u8,
25279    #[doc = "Remaining free transmitter buffer space."]
25280    pub txbuf: u8,
25281    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25282    pub noise: u8,
25283    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25284    pub remnoise: u8,
25285}
25286impl RADIO_STATUS_DATA {
25287    pub const ENCODED_LEN: usize = 9usize;
25288    pub const DEFAULT: Self = Self {
25289        rxerrors: 0_u16,
25290        fixed: 0_u16,
25291        rssi: 0_u8,
25292        remrssi: 0_u8,
25293        txbuf: 0_u8,
25294        noise: 0_u8,
25295        remnoise: 0_u8,
25296    };
25297    #[cfg(feature = "arbitrary")]
25298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25299        use arbitrary::{Arbitrary, Unstructured};
25300        let mut buf = [0u8; 1024];
25301        rng.fill_bytes(&mut buf);
25302        let mut unstructured = Unstructured::new(&buf);
25303        Self::arbitrary(&mut unstructured).unwrap_or_default()
25304    }
25305}
25306impl Default for RADIO_STATUS_DATA {
25307    fn default() -> Self {
25308        Self::DEFAULT.clone()
25309    }
25310}
25311impl MessageData for RADIO_STATUS_DATA {
25312    type Message = MavMessage;
25313    const ID: u32 = 109u32;
25314    const NAME: &'static str = "RADIO_STATUS";
25315    const EXTRA_CRC: u8 = 185u8;
25316    const ENCODED_LEN: usize = 9usize;
25317    fn deser(
25318        _version: MavlinkVersion,
25319        __input: &[u8],
25320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25321        let avail_len = __input.len();
25322        let mut payload_buf = [0; Self::ENCODED_LEN];
25323        let mut buf = if avail_len < Self::ENCODED_LEN {
25324            payload_buf[0..avail_len].copy_from_slice(__input);
25325            Bytes::new(&payload_buf)
25326        } else {
25327            Bytes::new(__input)
25328        };
25329        let mut __struct = Self::default();
25330        __struct.rxerrors = buf.get_u16_le()?;
25331        __struct.fixed = buf.get_u16_le()?;
25332        __struct.rssi = buf.get_u8()?;
25333        __struct.remrssi = buf.get_u8()?;
25334        __struct.txbuf = buf.get_u8()?;
25335        __struct.noise = buf.get_u8()?;
25336        __struct.remnoise = buf.get_u8()?;
25337        Ok(__struct)
25338    }
25339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25340        let mut __tmp = BytesMut::new(bytes);
25341        #[allow(clippy::absurd_extreme_comparisons)]
25342        #[allow(unused_comparisons)]
25343        if __tmp.remaining() < Self::ENCODED_LEN {
25344            panic!(
25345                "buffer is too small (need {} bytes, but got {})",
25346                Self::ENCODED_LEN,
25347                __tmp.remaining(),
25348            )
25349        }
25350        __tmp.put_u16_le(self.rxerrors);
25351        __tmp.put_u16_le(self.fixed);
25352        __tmp.put_u8(self.rssi);
25353        __tmp.put_u8(self.remrssi);
25354        __tmp.put_u8(self.txbuf);
25355        __tmp.put_u8(self.noise);
25356        __tmp.put_u8(self.remnoise);
25357        if matches!(version, MavlinkVersion::V2) {
25358            let len = __tmp.len();
25359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25360        } else {
25361            __tmp.len()
25362        }
25363    }
25364}
25365#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25366#[doc = ""]
25367#[doc = "ID: 27"]
25368#[derive(Debug, Clone, PartialEq)]
25369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25371#[cfg_attr(feature = "ts", derive(TS))]
25372#[cfg_attr(feature = "ts", ts(export))]
25373pub struct RAW_IMU_DATA {
25374    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25375    pub time_usec: u64,
25376    #[doc = "X acceleration (raw)"]
25377    pub xacc: i16,
25378    #[doc = "Y acceleration (raw)"]
25379    pub yacc: i16,
25380    #[doc = "Z acceleration (raw)"]
25381    pub zacc: i16,
25382    #[doc = "Angular speed around X axis (raw)"]
25383    pub xgyro: i16,
25384    #[doc = "Angular speed around Y axis (raw)"]
25385    pub ygyro: i16,
25386    #[doc = "Angular speed around Z axis (raw)"]
25387    pub zgyro: i16,
25388    #[doc = "X Magnetic field (raw)"]
25389    pub xmag: i16,
25390    #[doc = "Y Magnetic field (raw)"]
25391    pub ymag: i16,
25392    #[doc = "Z Magnetic field (raw)"]
25393    pub zmag: i16,
25394    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25395    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25396    pub id: u8,
25397    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25399    pub temperature: i16,
25400}
25401impl RAW_IMU_DATA {
25402    pub const ENCODED_LEN: usize = 29usize;
25403    pub const DEFAULT: Self = Self {
25404        time_usec: 0_u64,
25405        xacc: 0_i16,
25406        yacc: 0_i16,
25407        zacc: 0_i16,
25408        xgyro: 0_i16,
25409        ygyro: 0_i16,
25410        zgyro: 0_i16,
25411        xmag: 0_i16,
25412        ymag: 0_i16,
25413        zmag: 0_i16,
25414        id: 0_u8,
25415        temperature: 0_i16,
25416    };
25417    #[cfg(feature = "arbitrary")]
25418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25419        use arbitrary::{Arbitrary, Unstructured};
25420        let mut buf = [0u8; 1024];
25421        rng.fill_bytes(&mut buf);
25422        let mut unstructured = Unstructured::new(&buf);
25423        Self::arbitrary(&mut unstructured).unwrap_or_default()
25424    }
25425}
25426impl Default for RAW_IMU_DATA {
25427    fn default() -> Self {
25428        Self::DEFAULT.clone()
25429    }
25430}
25431impl MessageData for RAW_IMU_DATA {
25432    type Message = MavMessage;
25433    const ID: u32 = 27u32;
25434    const NAME: &'static str = "RAW_IMU";
25435    const EXTRA_CRC: u8 = 144u8;
25436    const ENCODED_LEN: usize = 29usize;
25437    fn deser(
25438        _version: MavlinkVersion,
25439        __input: &[u8],
25440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25441        let avail_len = __input.len();
25442        let mut payload_buf = [0; Self::ENCODED_LEN];
25443        let mut buf = if avail_len < Self::ENCODED_LEN {
25444            payload_buf[0..avail_len].copy_from_slice(__input);
25445            Bytes::new(&payload_buf)
25446        } else {
25447            Bytes::new(__input)
25448        };
25449        let mut __struct = Self::default();
25450        __struct.time_usec = buf.get_u64_le()?;
25451        __struct.xacc = buf.get_i16_le()?;
25452        __struct.yacc = buf.get_i16_le()?;
25453        __struct.zacc = buf.get_i16_le()?;
25454        __struct.xgyro = buf.get_i16_le()?;
25455        __struct.ygyro = buf.get_i16_le()?;
25456        __struct.zgyro = buf.get_i16_le()?;
25457        __struct.xmag = buf.get_i16_le()?;
25458        __struct.ymag = buf.get_i16_le()?;
25459        __struct.zmag = buf.get_i16_le()?;
25460        __struct.id = buf.get_u8()?;
25461        __struct.temperature = buf.get_i16_le()?;
25462        Ok(__struct)
25463    }
25464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25465        let mut __tmp = BytesMut::new(bytes);
25466        #[allow(clippy::absurd_extreme_comparisons)]
25467        #[allow(unused_comparisons)]
25468        if __tmp.remaining() < Self::ENCODED_LEN {
25469            panic!(
25470                "buffer is too small (need {} bytes, but got {})",
25471                Self::ENCODED_LEN,
25472                __tmp.remaining(),
25473            )
25474        }
25475        __tmp.put_u64_le(self.time_usec);
25476        __tmp.put_i16_le(self.xacc);
25477        __tmp.put_i16_le(self.yacc);
25478        __tmp.put_i16_le(self.zacc);
25479        __tmp.put_i16_le(self.xgyro);
25480        __tmp.put_i16_le(self.ygyro);
25481        __tmp.put_i16_le(self.zgyro);
25482        __tmp.put_i16_le(self.xmag);
25483        __tmp.put_i16_le(self.ymag);
25484        __tmp.put_i16_le(self.zmag);
25485        if matches!(version, MavlinkVersion::V2) {
25486            __tmp.put_u8(self.id);
25487            __tmp.put_i16_le(self.temperature);
25488            let len = __tmp.len();
25489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25490        } else {
25491            __tmp.len()
25492        }
25493    }
25494}
25495#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25496#[doc = ""]
25497#[doc = "ID: 28"]
25498#[derive(Debug, Clone, PartialEq)]
25499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25501#[cfg_attr(feature = "ts", derive(TS))]
25502#[cfg_attr(feature = "ts", ts(export))]
25503pub struct RAW_PRESSURE_DATA {
25504    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25505    pub time_usec: u64,
25506    #[doc = "Absolute pressure (raw)"]
25507    pub press_abs: i16,
25508    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25509    pub press_diff1: i16,
25510    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25511    pub press_diff2: i16,
25512    #[doc = "Raw Temperature measurement (raw)"]
25513    pub temperature: i16,
25514}
25515impl RAW_PRESSURE_DATA {
25516    pub const ENCODED_LEN: usize = 16usize;
25517    pub const DEFAULT: Self = Self {
25518        time_usec: 0_u64,
25519        press_abs: 0_i16,
25520        press_diff1: 0_i16,
25521        press_diff2: 0_i16,
25522        temperature: 0_i16,
25523    };
25524    #[cfg(feature = "arbitrary")]
25525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25526        use arbitrary::{Arbitrary, Unstructured};
25527        let mut buf = [0u8; 1024];
25528        rng.fill_bytes(&mut buf);
25529        let mut unstructured = Unstructured::new(&buf);
25530        Self::arbitrary(&mut unstructured).unwrap_or_default()
25531    }
25532}
25533impl Default for RAW_PRESSURE_DATA {
25534    fn default() -> Self {
25535        Self::DEFAULT.clone()
25536    }
25537}
25538impl MessageData for RAW_PRESSURE_DATA {
25539    type Message = MavMessage;
25540    const ID: u32 = 28u32;
25541    const NAME: &'static str = "RAW_PRESSURE";
25542    const EXTRA_CRC: u8 = 67u8;
25543    const ENCODED_LEN: usize = 16usize;
25544    fn deser(
25545        _version: MavlinkVersion,
25546        __input: &[u8],
25547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25548        let avail_len = __input.len();
25549        let mut payload_buf = [0; Self::ENCODED_LEN];
25550        let mut buf = if avail_len < Self::ENCODED_LEN {
25551            payload_buf[0..avail_len].copy_from_slice(__input);
25552            Bytes::new(&payload_buf)
25553        } else {
25554            Bytes::new(__input)
25555        };
25556        let mut __struct = Self::default();
25557        __struct.time_usec = buf.get_u64_le()?;
25558        __struct.press_abs = buf.get_i16_le()?;
25559        __struct.press_diff1 = buf.get_i16_le()?;
25560        __struct.press_diff2 = buf.get_i16_le()?;
25561        __struct.temperature = buf.get_i16_le()?;
25562        Ok(__struct)
25563    }
25564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25565        let mut __tmp = BytesMut::new(bytes);
25566        #[allow(clippy::absurd_extreme_comparisons)]
25567        #[allow(unused_comparisons)]
25568        if __tmp.remaining() < Self::ENCODED_LEN {
25569            panic!(
25570                "buffer is too small (need {} bytes, but got {})",
25571                Self::ENCODED_LEN,
25572                __tmp.remaining(),
25573            )
25574        }
25575        __tmp.put_u64_le(self.time_usec);
25576        __tmp.put_i16_le(self.press_abs);
25577        __tmp.put_i16_le(self.press_diff1);
25578        __tmp.put_i16_le(self.press_diff2);
25579        __tmp.put_i16_le(self.temperature);
25580        if matches!(version, MavlinkVersion::V2) {
25581            let len = __tmp.len();
25582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25583        } else {
25584            __tmp.len()
25585        }
25586    }
25587}
25588#[doc = "RPM sensor data message."]
25589#[doc = ""]
25590#[doc = "ID: 339"]
25591#[derive(Debug, Clone, PartialEq)]
25592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25594#[cfg_attr(feature = "ts", derive(TS))]
25595#[cfg_attr(feature = "ts", ts(export))]
25596pub struct RAW_RPM_DATA {
25597    #[doc = "Indicated rate"]
25598    pub frequency: f32,
25599    #[doc = "Index of this RPM sensor (0-indexed)"]
25600    pub index: u8,
25601}
25602impl RAW_RPM_DATA {
25603    pub const ENCODED_LEN: usize = 5usize;
25604    pub const DEFAULT: Self = Self {
25605        frequency: 0.0_f32,
25606        index: 0_u8,
25607    };
25608    #[cfg(feature = "arbitrary")]
25609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25610        use arbitrary::{Arbitrary, Unstructured};
25611        let mut buf = [0u8; 1024];
25612        rng.fill_bytes(&mut buf);
25613        let mut unstructured = Unstructured::new(&buf);
25614        Self::arbitrary(&mut unstructured).unwrap_or_default()
25615    }
25616}
25617impl Default for RAW_RPM_DATA {
25618    fn default() -> Self {
25619        Self::DEFAULT.clone()
25620    }
25621}
25622impl MessageData for RAW_RPM_DATA {
25623    type Message = MavMessage;
25624    const ID: u32 = 339u32;
25625    const NAME: &'static str = "RAW_RPM";
25626    const EXTRA_CRC: u8 = 199u8;
25627    const ENCODED_LEN: usize = 5usize;
25628    fn deser(
25629        _version: MavlinkVersion,
25630        __input: &[u8],
25631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25632        let avail_len = __input.len();
25633        let mut payload_buf = [0; Self::ENCODED_LEN];
25634        let mut buf = if avail_len < Self::ENCODED_LEN {
25635            payload_buf[0..avail_len].copy_from_slice(__input);
25636            Bytes::new(&payload_buf)
25637        } else {
25638            Bytes::new(__input)
25639        };
25640        let mut __struct = Self::default();
25641        __struct.frequency = buf.get_f32_le()?;
25642        __struct.index = buf.get_u8()?;
25643        Ok(__struct)
25644    }
25645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25646        let mut __tmp = BytesMut::new(bytes);
25647        #[allow(clippy::absurd_extreme_comparisons)]
25648        #[allow(unused_comparisons)]
25649        if __tmp.remaining() < Self::ENCODED_LEN {
25650            panic!(
25651                "buffer is too small (need {} bytes, but got {})",
25652                Self::ENCODED_LEN,
25653                __tmp.remaining(),
25654            )
25655        }
25656        __tmp.put_f32_le(self.frequency);
25657        __tmp.put_u8(self.index);
25658        if matches!(version, MavlinkVersion::V2) {
25659            let len = __tmp.len();
25660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25661        } else {
25662            __tmp.len()
25663        }
25664    }
25665}
25666#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25667#[doc = ""]
25668#[doc = "ID: 65"]
25669#[derive(Debug, Clone, PartialEq)]
25670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25672#[cfg_attr(feature = "ts", derive(TS))]
25673#[cfg_attr(feature = "ts", ts(export))]
25674pub struct RC_CHANNELS_DATA {
25675    #[doc = "Timestamp (time since system boot)."]
25676    pub time_boot_ms: u32,
25677    #[doc = "RC channel 1 value."]
25678    pub chan1_raw: u16,
25679    #[doc = "RC channel 2 value."]
25680    pub chan2_raw: u16,
25681    #[doc = "RC channel 3 value."]
25682    pub chan3_raw: u16,
25683    #[doc = "RC channel 4 value."]
25684    pub chan4_raw: u16,
25685    #[doc = "RC channel 5 value."]
25686    pub chan5_raw: u16,
25687    #[doc = "RC channel 6 value."]
25688    pub chan6_raw: u16,
25689    #[doc = "RC channel 7 value."]
25690    pub chan7_raw: u16,
25691    #[doc = "RC channel 8 value."]
25692    pub chan8_raw: u16,
25693    #[doc = "RC channel 9 value."]
25694    pub chan9_raw: u16,
25695    #[doc = "RC channel 10 value."]
25696    pub chan10_raw: u16,
25697    #[doc = "RC channel 11 value."]
25698    pub chan11_raw: u16,
25699    #[doc = "RC channel 12 value."]
25700    pub chan12_raw: u16,
25701    #[doc = "RC channel 13 value."]
25702    pub chan13_raw: u16,
25703    #[doc = "RC channel 14 value."]
25704    pub chan14_raw: u16,
25705    #[doc = "RC channel 15 value."]
25706    pub chan15_raw: u16,
25707    #[doc = "RC channel 16 value."]
25708    pub chan16_raw: u16,
25709    #[doc = "RC channel 17 value."]
25710    pub chan17_raw: u16,
25711    #[doc = "RC channel 18 value."]
25712    pub chan18_raw: u16,
25713    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25714    pub chancount: u8,
25715    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25716    pub rssi: u8,
25717}
25718impl RC_CHANNELS_DATA {
25719    pub const ENCODED_LEN: usize = 42usize;
25720    pub const DEFAULT: Self = Self {
25721        time_boot_ms: 0_u32,
25722        chan1_raw: 0_u16,
25723        chan2_raw: 0_u16,
25724        chan3_raw: 0_u16,
25725        chan4_raw: 0_u16,
25726        chan5_raw: 0_u16,
25727        chan6_raw: 0_u16,
25728        chan7_raw: 0_u16,
25729        chan8_raw: 0_u16,
25730        chan9_raw: 0_u16,
25731        chan10_raw: 0_u16,
25732        chan11_raw: 0_u16,
25733        chan12_raw: 0_u16,
25734        chan13_raw: 0_u16,
25735        chan14_raw: 0_u16,
25736        chan15_raw: 0_u16,
25737        chan16_raw: 0_u16,
25738        chan17_raw: 0_u16,
25739        chan18_raw: 0_u16,
25740        chancount: 0_u8,
25741        rssi: 0_u8,
25742    };
25743    #[cfg(feature = "arbitrary")]
25744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25745        use arbitrary::{Arbitrary, Unstructured};
25746        let mut buf = [0u8; 1024];
25747        rng.fill_bytes(&mut buf);
25748        let mut unstructured = Unstructured::new(&buf);
25749        Self::arbitrary(&mut unstructured).unwrap_or_default()
25750    }
25751}
25752impl Default for RC_CHANNELS_DATA {
25753    fn default() -> Self {
25754        Self::DEFAULT.clone()
25755    }
25756}
25757impl MessageData for RC_CHANNELS_DATA {
25758    type Message = MavMessage;
25759    const ID: u32 = 65u32;
25760    const NAME: &'static str = "RC_CHANNELS";
25761    const EXTRA_CRC: u8 = 118u8;
25762    const ENCODED_LEN: usize = 42usize;
25763    fn deser(
25764        _version: MavlinkVersion,
25765        __input: &[u8],
25766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25767        let avail_len = __input.len();
25768        let mut payload_buf = [0; Self::ENCODED_LEN];
25769        let mut buf = if avail_len < Self::ENCODED_LEN {
25770            payload_buf[0..avail_len].copy_from_slice(__input);
25771            Bytes::new(&payload_buf)
25772        } else {
25773            Bytes::new(__input)
25774        };
25775        let mut __struct = Self::default();
25776        __struct.time_boot_ms = buf.get_u32_le()?;
25777        __struct.chan1_raw = buf.get_u16_le()?;
25778        __struct.chan2_raw = buf.get_u16_le()?;
25779        __struct.chan3_raw = buf.get_u16_le()?;
25780        __struct.chan4_raw = buf.get_u16_le()?;
25781        __struct.chan5_raw = buf.get_u16_le()?;
25782        __struct.chan6_raw = buf.get_u16_le()?;
25783        __struct.chan7_raw = buf.get_u16_le()?;
25784        __struct.chan8_raw = buf.get_u16_le()?;
25785        __struct.chan9_raw = buf.get_u16_le()?;
25786        __struct.chan10_raw = buf.get_u16_le()?;
25787        __struct.chan11_raw = buf.get_u16_le()?;
25788        __struct.chan12_raw = buf.get_u16_le()?;
25789        __struct.chan13_raw = buf.get_u16_le()?;
25790        __struct.chan14_raw = buf.get_u16_le()?;
25791        __struct.chan15_raw = buf.get_u16_le()?;
25792        __struct.chan16_raw = buf.get_u16_le()?;
25793        __struct.chan17_raw = buf.get_u16_le()?;
25794        __struct.chan18_raw = buf.get_u16_le()?;
25795        __struct.chancount = buf.get_u8()?;
25796        __struct.rssi = buf.get_u8()?;
25797        Ok(__struct)
25798    }
25799    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25800        let mut __tmp = BytesMut::new(bytes);
25801        #[allow(clippy::absurd_extreme_comparisons)]
25802        #[allow(unused_comparisons)]
25803        if __tmp.remaining() < Self::ENCODED_LEN {
25804            panic!(
25805                "buffer is too small (need {} bytes, but got {})",
25806                Self::ENCODED_LEN,
25807                __tmp.remaining(),
25808            )
25809        }
25810        __tmp.put_u32_le(self.time_boot_ms);
25811        __tmp.put_u16_le(self.chan1_raw);
25812        __tmp.put_u16_le(self.chan2_raw);
25813        __tmp.put_u16_le(self.chan3_raw);
25814        __tmp.put_u16_le(self.chan4_raw);
25815        __tmp.put_u16_le(self.chan5_raw);
25816        __tmp.put_u16_le(self.chan6_raw);
25817        __tmp.put_u16_le(self.chan7_raw);
25818        __tmp.put_u16_le(self.chan8_raw);
25819        __tmp.put_u16_le(self.chan9_raw);
25820        __tmp.put_u16_le(self.chan10_raw);
25821        __tmp.put_u16_le(self.chan11_raw);
25822        __tmp.put_u16_le(self.chan12_raw);
25823        __tmp.put_u16_le(self.chan13_raw);
25824        __tmp.put_u16_le(self.chan14_raw);
25825        __tmp.put_u16_le(self.chan15_raw);
25826        __tmp.put_u16_le(self.chan16_raw);
25827        __tmp.put_u16_le(self.chan17_raw);
25828        __tmp.put_u16_le(self.chan18_raw);
25829        __tmp.put_u8(self.chancount);
25830        __tmp.put_u8(self.rssi);
25831        if matches!(version, MavlinkVersion::V2) {
25832            let len = __tmp.len();
25833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25834        } else {
25835            __tmp.len()
25836        }
25837    }
25838}
25839#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25840#[doc = ""]
25841#[doc = "ID: 70"]
25842#[derive(Debug, Clone, PartialEq)]
25843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25845#[cfg_attr(feature = "ts", derive(TS))]
25846#[cfg_attr(feature = "ts", ts(export))]
25847pub struct RC_CHANNELS_OVERRIDE_DATA {
25848    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25849    pub chan1_raw: u16,
25850    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25851    pub chan2_raw: u16,
25852    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25853    pub chan3_raw: u16,
25854    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25855    pub chan4_raw: u16,
25856    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25857    pub chan5_raw: u16,
25858    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25859    pub chan6_raw: u16,
25860    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25861    pub chan7_raw: u16,
25862    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25863    pub chan8_raw: u16,
25864    #[doc = "System ID"]
25865    pub target_system: u8,
25866    #[doc = "Component ID"]
25867    pub target_component: u8,
25868    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25869    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25870    pub chan9_raw: u16,
25871    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25872    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25873    pub chan10_raw: u16,
25874    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25875    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25876    pub chan11_raw: u16,
25877    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25878    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25879    pub chan12_raw: u16,
25880    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25882    pub chan13_raw: u16,
25883    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25885    pub chan14_raw: u16,
25886    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25888    pub chan15_raw: u16,
25889    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25891    pub chan16_raw: u16,
25892    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25894    pub chan17_raw: u16,
25895    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25897    pub chan18_raw: u16,
25898}
25899impl RC_CHANNELS_OVERRIDE_DATA {
25900    pub const ENCODED_LEN: usize = 38usize;
25901    pub const DEFAULT: Self = Self {
25902        chan1_raw: 0_u16,
25903        chan2_raw: 0_u16,
25904        chan3_raw: 0_u16,
25905        chan4_raw: 0_u16,
25906        chan5_raw: 0_u16,
25907        chan6_raw: 0_u16,
25908        chan7_raw: 0_u16,
25909        chan8_raw: 0_u16,
25910        target_system: 0_u8,
25911        target_component: 0_u8,
25912        chan9_raw: 0_u16,
25913        chan10_raw: 0_u16,
25914        chan11_raw: 0_u16,
25915        chan12_raw: 0_u16,
25916        chan13_raw: 0_u16,
25917        chan14_raw: 0_u16,
25918        chan15_raw: 0_u16,
25919        chan16_raw: 0_u16,
25920        chan17_raw: 0_u16,
25921        chan18_raw: 0_u16,
25922    };
25923    #[cfg(feature = "arbitrary")]
25924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25925        use arbitrary::{Arbitrary, Unstructured};
25926        let mut buf = [0u8; 1024];
25927        rng.fill_bytes(&mut buf);
25928        let mut unstructured = Unstructured::new(&buf);
25929        Self::arbitrary(&mut unstructured).unwrap_or_default()
25930    }
25931}
25932impl Default for RC_CHANNELS_OVERRIDE_DATA {
25933    fn default() -> Self {
25934        Self::DEFAULT.clone()
25935    }
25936}
25937impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25938    type Message = MavMessage;
25939    const ID: u32 = 70u32;
25940    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25941    const EXTRA_CRC: u8 = 124u8;
25942    const ENCODED_LEN: usize = 38usize;
25943    fn deser(
25944        _version: MavlinkVersion,
25945        __input: &[u8],
25946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25947        let avail_len = __input.len();
25948        let mut payload_buf = [0; Self::ENCODED_LEN];
25949        let mut buf = if avail_len < Self::ENCODED_LEN {
25950            payload_buf[0..avail_len].copy_from_slice(__input);
25951            Bytes::new(&payload_buf)
25952        } else {
25953            Bytes::new(__input)
25954        };
25955        let mut __struct = Self::default();
25956        __struct.chan1_raw = buf.get_u16_le()?;
25957        __struct.chan2_raw = buf.get_u16_le()?;
25958        __struct.chan3_raw = buf.get_u16_le()?;
25959        __struct.chan4_raw = buf.get_u16_le()?;
25960        __struct.chan5_raw = buf.get_u16_le()?;
25961        __struct.chan6_raw = buf.get_u16_le()?;
25962        __struct.chan7_raw = buf.get_u16_le()?;
25963        __struct.chan8_raw = buf.get_u16_le()?;
25964        __struct.target_system = buf.get_u8()?;
25965        __struct.target_component = buf.get_u8()?;
25966        __struct.chan9_raw = buf.get_u16_le()?;
25967        __struct.chan10_raw = buf.get_u16_le()?;
25968        __struct.chan11_raw = buf.get_u16_le()?;
25969        __struct.chan12_raw = buf.get_u16_le()?;
25970        __struct.chan13_raw = buf.get_u16_le()?;
25971        __struct.chan14_raw = buf.get_u16_le()?;
25972        __struct.chan15_raw = buf.get_u16_le()?;
25973        __struct.chan16_raw = buf.get_u16_le()?;
25974        __struct.chan17_raw = buf.get_u16_le()?;
25975        __struct.chan18_raw = buf.get_u16_le()?;
25976        Ok(__struct)
25977    }
25978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25979        let mut __tmp = BytesMut::new(bytes);
25980        #[allow(clippy::absurd_extreme_comparisons)]
25981        #[allow(unused_comparisons)]
25982        if __tmp.remaining() < Self::ENCODED_LEN {
25983            panic!(
25984                "buffer is too small (need {} bytes, but got {})",
25985                Self::ENCODED_LEN,
25986                __tmp.remaining(),
25987            )
25988        }
25989        __tmp.put_u16_le(self.chan1_raw);
25990        __tmp.put_u16_le(self.chan2_raw);
25991        __tmp.put_u16_le(self.chan3_raw);
25992        __tmp.put_u16_le(self.chan4_raw);
25993        __tmp.put_u16_le(self.chan5_raw);
25994        __tmp.put_u16_le(self.chan6_raw);
25995        __tmp.put_u16_le(self.chan7_raw);
25996        __tmp.put_u16_le(self.chan8_raw);
25997        __tmp.put_u8(self.target_system);
25998        __tmp.put_u8(self.target_component);
25999        if matches!(version, MavlinkVersion::V2) {
26000            __tmp.put_u16_le(self.chan9_raw);
26001            __tmp.put_u16_le(self.chan10_raw);
26002            __tmp.put_u16_le(self.chan11_raw);
26003            __tmp.put_u16_le(self.chan12_raw);
26004            __tmp.put_u16_le(self.chan13_raw);
26005            __tmp.put_u16_le(self.chan14_raw);
26006            __tmp.put_u16_le(self.chan15_raw);
26007            __tmp.put_u16_le(self.chan16_raw);
26008            __tmp.put_u16_le(self.chan17_raw);
26009            __tmp.put_u16_le(self.chan18_raw);
26010            let len = __tmp.len();
26011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26012        } else {
26013            __tmp.len()
26014        }
26015    }
26016}
26017#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26018#[doc = ""]
26019#[doc = "ID: 35"]
26020#[derive(Debug, Clone, PartialEq)]
26021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26023#[cfg_attr(feature = "ts", derive(TS))]
26024#[cfg_attr(feature = "ts", ts(export))]
26025pub struct RC_CHANNELS_RAW_DATA {
26026    #[doc = "Timestamp (time since system boot)."]
26027    pub time_boot_ms: u32,
26028    #[doc = "RC channel 1 value."]
26029    pub chan1_raw: u16,
26030    #[doc = "RC channel 2 value."]
26031    pub chan2_raw: u16,
26032    #[doc = "RC channel 3 value."]
26033    pub chan3_raw: u16,
26034    #[doc = "RC channel 4 value."]
26035    pub chan4_raw: u16,
26036    #[doc = "RC channel 5 value."]
26037    pub chan5_raw: u16,
26038    #[doc = "RC channel 6 value."]
26039    pub chan6_raw: u16,
26040    #[doc = "RC channel 7 value."]
26041    pub chan7_raw: u16,
26042    #[doc = "RC channel 8 value."]
26043    pub chan8_raw: u16,
26044    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26045    pub port: u8,
26046    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26047    pub rssi: u8,
26048}
26049impl RC_CHANNELS_RAW_DATA {
26050    pub const ENCODED_LEN: usize = 22usize;
26051    pub const DEFAULT: Self = Self {
26052        time_boot_ms: 0_u32,
26053        chan1_raw: 0_u16,
26054        chan2_raw: 0_u16,
26055        chan3_raw: 0_u16,
26056        chan4_raw: 0_u16,
26057        chan5_raw: 0_u16,
26058        chan6_raw: 0_u16,
26059        chan7_raw: 0_u16,
26060        chan8_raw: 0_u16,
26061        port: 0_u8,
26062        rssi: 0_u8,
26063    };
26064    #[cfg(feature = "arbitrary")]
26065    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26066        use arbitrary::{Arbitrary, Unstructured};
26067        let mut buf = [0u8; 1024];
26068        rng.fill_bytes(&mut buf);
26069        let mut unstructured = Unstructured::new(&buf);
26070        Self::arbitrary(&mut unstructured).unwrap_or_default()
26071    }
26072}
26073impl Default for RC_CHANNELS_RAW_DATA {
26074    fn default() -> Self {
26075        Self::DEFAULT.clone()
26076    }
26077}
26078impl MessageData for RC_CHANNELS_RAW_DATA {
26079    type Message = MavMessage;
26080    const ID: u32 = 35u32;
26081    const NAME: &'static str = "RC_CHANNELS_RAW";
26082    const EXTRA_CRC: u8 = 244u8;
26083    const ENCODED_LEN: usize = 22usize;
26084    fn deser(
26085        _version: MavlinkVersion,
26086        __input: &[u8],
26087    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26088        let avail_len = __input.len();
26089        let mut payload_buf = [0; Self::ENCODED_LEN];
26090        let mut buf = if avail_len < Self::ENCODED_LEN {
26091            payload_buf[0..avail_len].copy_from_slice(__input);
26092            Bytes::new(&payload_buf)
26093        } else {
26094            Bytes::new(__input)
26095        };
26096        let mut __struct = Self::default();
26097        __struct.time_boot_ms = buf.get_u32_le()?;
26098        __struct.chan1_raw = buf.get_u16_le()?;
26099        __struct.chan2_raw = buf.get_u16_le()?;
26100        __struct.chan3_raw = buf.get_u16_le()?;
26101        __struct.chan4_raw = buf.get_u16_le()?;
26102        __struct.chan5_raw = buf.get_u16_le()?;
26103        __struct.chan6_raw = buf.get_u16_le()?;
26104        __struct.chan7_raw = buf.get_u16_le()?;
26105        __struct.chan8_raw = buf.get_u16_le()?;
26106        __struct.port = buf.get_u8()?;
26107        __struct.rssi = buf.get_u8()?;
26108        Ok(__struct)
26109    }
26110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26111        let mut __tmp = BytesMut::new(bytes);
26112        #[allow(clippy::absurd_extreme_comparisons)]
26113        #[allow(unused_comparisons)]
26114        if __tmp.remaining() < Self::ENCODED_LEN {
26115            panic!(
26116                "buffer is too small (need {} bytes, but got {})",
26117                Self::ENCODED_LEN,
26118                __tmp.remaining(),
26119            )
26120        }
26121        __tmp.put_u32_le(self.time_boot_ms);
26122        __tmp.put_u16_le(self.chan1_raw);
26123        __tmp.put_u16_le(self.chan2_raw);
26124        __tmp.put_u16_le(self.chan3_raw);
26125        __tmp.put_u16_le(self.chan4_raw);
26126        __tmp.put_u16_le(self.chan5_raw);
26127        __tmp.put_u16_le(self.chan6_raw);
26128        __tmp.put_u16_le(self.chan7_raw);
26129        __tmp.put_u16_le(self.chan8_raw);
26130        __tmp.put_u8(self.port);
26131        __tmp.put_u8(self.rssi);
26132        if matches!(version, MavlinkVersion::V2) {
26133            let len = __tmp.len();
26134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26135        } else {
26136            __tmp.len()
26137        }
26138    }
26139}
26140#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26141#[doc = ""]
26142#[doc = "ID: 34"]
26143#[derive(Debug, Clone, PartialEq)]
26144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26146#[cfg_attr(feature = "ts", derive(TS))]
26147#[cfg_attr(feature = "ts", ts(export))]
26148pub struct RC_CHANNELS_SCALED_DATA {
26149    #[doc = "Timestamp (time since system boot)."]
26150    pub time_boot_ms: u32,
26151    #[doc = "RC channel 1 value scaled."]
26152    pub chan1_scaled: i16,
26153    #[doc = "RC channel 2 value scaled."]
26154    pub chan2_scaled: i16,
26155    #[doc = "RC channel 3 value scaled."]
26156    pub chan3_scaled: i16,
26157    #[doc = "RC channel 4 value scaled."]
26158    pub chan4_scaled: i16,
26159    #[doc = "RC channel 5 value scaled."]
26160    pub chan5_scaled: i16,
26161    #[doc = "RC channel 6 value scaled."]
26162    pub chan6_scaled: i16,
26163    #[doc = "RC channel 7 value scaled."]
26164    pub chan7_scaled: i16,
26165    #[doc = "RC channel 8 value scaled."]
26166    pub chan8_scaled: i16,
26167    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26168    pub port: u8,
26169    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26170    pub rssi: u8,
26171}
26172impl RC_CHANNELS_SCALED_DATA {
26173    pub const ENCODED_LEN: usize = 22usize;
26174    pub const DEFAULT: Self = Self {
26175        time_boot_ms: 0_u32,
26176        chan1_scaled: 0_i16,
26177        chan2_scaled: 0_i16,
26178        chan3_scaled: 0_i16,
26179        chan4_scaled: 0_i16,
26180        chan5_scaled: 0_i16,
26181        chan6_scaled: 0_i16,
26182        chan7_scaled: 0_i16,
26183        chan8_scaled: 0_i16,
26184        port: 0_u8,
26185        rssi: 0_u8,
26186    };
26187    #[cfg(feature = "arbitrary")]
26188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26189        use arbitrary::{Arbitrary, Unstructured};
26190        let mut buf = [0u8; 1024];
26191        rng.fill_bytes(&mut buf);
26192        let mut unstructured = Unstructured::new(&buf);
26193        Self::arbitrary(&mut unstructured).unwrap_or_default()
26194    }
26195}
26196impl Default for RC_CHANNELS_SCALED_DATA {
26197    fn default() -> Self {
26198        Self::DEFAULT.clone()
26199    }
26200}
26201impl MessageData for RC_CHANNELS_SCALED_DATA {
26202    type Message = MavMessage;
26203    const ID: u32 = 34u32;
26204    const NAME: &'static str = "RC_CHANNELS_SCALED";
26205    const EXTRA_CRC: u8 = 237u8;
26206    const ENCODED_LEN: usize = 22usize;
26207    fn deser(
26208        _version: MavlinkVersion,
26209        __input: &[u8],
26210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26211        let avail_len = __input.len();
26212        let mut payload_buf = [0; Self::ENCODED_LEN];
26213        let mut buf = if avail_len < Self::ENCODED_LEN {
26214            payload_buf[0..avail_len].copy_from_slice(__input);
26215            Bytes::new(&payload_buf)
26216        } else {
26217            Bytes::new(__input)
26218        };
26219        let mut __struct = Self::default();
26220        __struct.time_boot_ms = buf.get_u32_le()?;
26221        __struct.chan1_scaled = buf.get_i16_le()?;
26222        __struct.chan2_scaled = buf.get_i16_le()?;
26223        __struct.chan3_scaled = buf.get_i16_le()?;
26224        __struct.chan4_scaled = buf.get_i16_le()?;
26225        __struct.chan5_scaled = buf.get_i16_le()?;
26226        __struct.chan6_scaled = buf.get_i16_le()?;
26227        __struct.chan7_scaled = buf.get_i16_le()?;
26228        __struct.chan8_scaled = buf.get_i16_le()?;
26229        __struct.port = buf.get_u8()?;
26230        __struct.rssi = buf.get_u8()?;
26231        Ok(__struct)
26232    }
26233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26234        let mut __tmp = BytesMut::new(bytes);
26235        #[allow(clippy::absurd_extreme_comparisons)]
26236        #[allow(unused_comparisons)]
26237        if __tmp.remaining() < Self::ENCODED_LEN {
26238            panic!(
26239                "buffer is too small (need {} bytes, but got {})",
26240                Self::ENCODED_LEN,
26241                __tmp.remaining(),
26242            )
26243        }
26244        __tmp.put_u32_le(self.time_boot_ms);
26245        __tmp.put_i16_le(self.chan1_scaled);
26246        __tmp.put_i16_le(self.chan2_scaled);
26247        __tmp.put_i16_le(self.chan3_scaled);
26248        __tmp.put_i16_le(self.chan4_scaled);
26249        __tmp.put_i16_le(self.chan5_scaled);
26250        __tmp.put_i16_le(self.chan6_scaled);
26251        __tmp.put_i16_le(self.chan7_scaled);
26252        __tmp.put_i16_le(self.chan8_scaled);
26253        __tmp.put_u8(self.port);
26254        __tmp.put_u8(self.rssi);
26255        if matches!(version, MavlinkVersion::V2) {
26256            let len = __tmp.len();
26257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26258        } else {
26259            __tmp.len()
26260        }
26261    }
26262}
26263#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26264#[doc = "Request a data stream."]
26265#[doc = ""]
26266#[doc = "ID: 66"]
26267#[derive(Debug, Clone, PartialEq)]
26268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26270#[cfg_attr(feature = "ts", derive(TS))]
26271#[cfg_attr(feature = "ts", ts(export))]
26272pub struct REQUEST_DATA_STREAM_DATA {
26273    #[doc = "The requested message rate"]
26274    pub req_message_rate: u16,
26275    #[doc = "The target requested to send the message stream."]
26276    pub target_system: u8,
26277    #[doc = "The target requested to send the message stream."]
26278    pub target_component: u8,
26279    #[doc = "The ID of the requested data stream"]
26280    pub req_stream_id: u8,
26281    #[doc = "1 to start sending, 0 to stop sending."]
26282    pub start_stop: u8,
26283}
26284impl REQUEST_DATA_STREAM_DATA {
26285    pub const ENCODED_LEN: usize = 6usize;
26286    pub const DEFAULT: Self = Self {
26287        req_message_rate: 0_u16,
26288        target_system: 0_u8,
26289        target_component: 0_u8,
26290        req_stream_id: 0_u8,
26291        start_stop: 0_u8,
26292    };
26293    #[cfg(feature = "arbitrary")]
26294    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26295        use arbitrary::{Arbitrary, Unstructured};
26296        let mut buf = [0u8; 1024];
26297        rng.fill_bytes(&mut buf);
26298        let mut unstructured = Unstructured::new(&buf);
26299        Self::arbitrary(&mut unstructured).unwrap_or_default()
26300    }
26301}
26302impl Default for REQUEST_DATA_STREAM_DATA {
26303    fn default() -> Self {
26304        Self::DEFAULT.clone()
26305    }
26306}
26307impl MessageData for REQUEST_DATA_STREAM_DATA {
26308    type Message = MavMessage;
26309    const ID: u32 = 66u32;
26310    const NAME: &'static str = "REQUEST_DATA_STREAM";
26311    const EXTRA_CRC: u8 = 148u8;
26312    const ENCODED_LEN: usize = 6usize;
26313    fn deser(
26314        _version: MavlinkVersion,
26315        __input: &[u8],
26316    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26317        let avail_len = __input.len();
26318        let mut payload_buf = [0; Self::ENCODED_LEN];
26319        let mut buf = if avail_len < Self::ENCODED_LEN {
26320            payload_buf[0..avail_len].copy_from_slice(__input);
26321            Bytes::new(&payload_buf)
26322        } else {
26323            Bytes::new(__input)
26324        };
26325        let mut __struct = Self::default();
26326        __struct.req_message_rate = buf.get_u16_le()?;
26327        __struct.target_system = buf.get_u8()?;
26328        __struct.target_component = buf.get_u8()?;
26329        __struct.req_stream_id = buf.get_u8()?;
26330        __struct.start_stop = buf.get_u8()?;
26331        Ok(__struct)
26332    }
26333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26334        let mut __tmp = BytesMut::new(bytes);
26335        #[allow(clippy::absurd_extreme_comparisons)]
26336        #[allow(unused_comparisons)]
26337        if __tmp.remaining() < Self::ENCODED_LEN {
26338            panic!(
26339                "buffer is too small (need {} bytes, but got {})",
26340                Self::ENCODED_LEN,
26341                __tmp.remaining(),
26342            )
26343        }
26344        __tmp.put_u16_le(self.req_message_rate);
26345        __tmp.put_u8(self.target_system);
26346        __tmp.put_u8(self.target_component);
26347        __tmp.put_u8(self.req_stream_id);
26348        __tmp.put_u8(self.start_stop);
26349        if matches!(version, MavlinkVersion::V2) {
26350            let len = __tmp.len();
26351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26352        } else {
26353            __tmp.len()
26354        }
26355    }
26356}
26357#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26358#[doc = ""]
26359#[doc = "ID: 412"]
26360#[derive(Debug, Clone, PartialEq)]
26361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26363#[cfg_attr(feature = "ts", derive(TS))]
26364#[cfg_attr(feature = "ts", ts(export))]
26365pub struct REQUEST_EVENT_DATA {
26366    #[doc = "First sequence number of the requested event."]
26367    pub first_sequence: u16,
26368    #[doc = "Last sequence number of the requested event."]
26369    pub last_sequence: u16,
26370    #[doc = "System ID"]
26371    pub target_system: u8,
26372    #[doc = "Component ID"]
26373    pub target_component: u8,
26374}
26375impl REQUEST_EVENT_DATA {
26376    pub const ENCODED_LEN: usize = 6usize;
26377    pub const DEFAULT: Self = Self {
26378        first_sequence: 0_u16,
26379        last_sequence: 0_u16,
26380        target_system: 0_u8,
26381        target_component: 0_u8,
26382    };
26383    #[cfg(feature = "arbitrary")]
26384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26385        use arbitrary::{Arbitrary, Unstructured};
26386        let mut buf = [0u8; 1024];
26387        rng.fill_bytes(&mut buf);
26388        let mut unstructured = Unstructured::new(&buf);
26389        Self::arbitrary(&mut unstructured).unwrap_or_default()
26390    }
26391}
26392impl Default for REQUEST_EVENT_DATA {
26393    fn default() -> Self {
26394        Self::DEFAULT.clone()
26395    }
26396}
26397impl MessageData for REQUEST_EVENT_DATA {
26398    type Message = MavMessage;
26399    const ID: u32 = 412u32;
26400    const NAME: &'static str = "REQUEST_EVENT";
26401    const EXTRA_CRC: u8 = 33u8;
26402    const ENCODED_LEN: usize = 6usize;
26403    fn deser(
26404        _version: MavlinkVersion,
26405        __input: &[u8],
26406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26407        let avail_len = __input.len();
26408        let mut payload_buf = [0; Self::ENCODED_LEN];
26409        let mut buf = if avail_len < Self::ENCODED_LEN {
26410            payload_buf[0..avail_len].copy_from_slice(__input);
26411            Bytes::new(&payload_buf)
26412        } else {
26413            Bytes::new(__input)
26414        };
26415        let mut __struct = Self::default();
26416        __struct.first_sequence = buf.get_u16_le()?;
26417        __struct.last_sequence = buf.get_u16_le()?;
26418        __struct.target_system = buf.get_u8()?;
26419        __struct.target_component = buf.get_u8()?;
26420        Ok(__struct)
26421    }
26422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26423        let mut __tmp = BytesMut::new(bytes);
26424        #[allow(clippy::absurd_extreme_comparisons)]
26425        #[allow(unused_comparisons)]
26426        if __tmp.remaining() < Self::ENCODED_LEN {
26427            panic!(
26428                "buffer is too small (need {} bytes, but got {})",
26429                Self::ENCODED_LEN,
26430                __tmp.remaining(),
26431            )
26432        }
26433        __tmp.put_u16_le(self.first_sequence);
26434        __tmp.put_u16_le(self.last_sequence);
26435        __tmp.put_u8(self.target_system);
26436        __tmp.put_u8(self.target_component);
26437        if matches!(version, MavlinkVersion::V2) {
26438            let len = __tmp.len();
26439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26440        } else {
26441            __tmp.len()
26442        }
26443    }
26444}
26445#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26446#[doc = ""]
26447#[doc = "ID: 142"]
26448#[derive(Debug, Clone, PartialEq)]
26449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26451#[cfg_attr(feature = "ts", derive(TS))]
26452#[cfg_attr(feature = "ts", ts(export))]
26453pub struct RESOURCE_REQUEST_DATA {
26454    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26455    pub request_id: u8,
26456    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26457    pub uri_type: u8,
26458    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26459    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26460    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26461    pub uri: [u8; 120],
26462    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26463    pub transfer_type: u8,
26464    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26467    pub storage: [u8; 120],
26468}
26469impl RESOURCE_REQUEST_DATA {
26470    pub const ENCODED_LEN: usize = 243usize;
26471    pub const DEFAULT: Self = Self {
26472        request_id: 0_u8,
26473        uri_type: 0_u8,
26474        uri: [0_u8; 120usize],
26475        transfer_type: 0_u8,
26476        storage: [0_u8; 120usize],
26477    };
26478    #[cfg(feature = "arbitrary")]
26479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26480        use arbitrary::{Arbitrary, Unstructured};
26481        let mut buf = [0u8; 1024];
26482        rng.fill_bytes(&mut buf);
26483        let mut unstructured = Unstructured::new(&buf);
26484        Self::arbitrary(&mut unstructured).unwrap_or_default()
26485    }
26486}
26487impl Default for RESOURCE_REQUEST_DATA {
26488    fn default() -> Self {
26489        Self::DEFAULT.clone()
26490    }
26491}
26492impl MessageData for RESOURCE_REQUEST_DATA {
26493    type Message = MavMessage;
26494    const ID: u32 = 142u32;
26495    const NAME: &'static str = "RESOURCE_REQUEST";
26496    const EXTRA_CRC: u8 = 72u8;
26497    const ENCODED_LEN: usize = 243usize;
26498    fn deser(
26499        _version: MavlinkVersion,
26500        __input: &[u8],
26501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26502        let avail_len = __input.len();
26503        let mut payload_buf = [0; Self::ENCODED_LEN];
26504        let mut buf = if avail_len < Self::ENCODED_LEN {
26505            payload_buf[0..avail_len].copy_from_slice(__input);
26506            Bytes::new(&payload_buf)
26507        } else {
26508            Bytes::new(__input)
26509        };
26510        let mut __struct = Self::default();
26511        __struct.request_id = buf.get_u8()?;
26512        __struct.uri_type = buf.get_u8()?;
26513        for v in &mut __struct.uri {
26514            let val = buf.get_u8()?;
26515            *v = val;
26516        }
26517        __struct.transfer_type = buf.get_u8()?;
26518        for v in &mut __struct.storage {
26519            let val = buf.get_u8()?;
26520            *v = val;
26521        }
26522        Ok(__struct)
26523    }
26524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26525        let mut __tmp = BytesMut::new(bytes);
26526        #[allow(clippy::absurd_extreme_comparisons)]
26527        #[allow(unused_comparisons)]
26528        if __tmp.remaining() < Self::ENCODED_LEN {
26529            panic!(
26530                "buffer is too small (need {} bytes, but got {})",
26531                Self::ENCODED_LEN,
26532                __tmp.remaining(),
26533            )
26534        }
26535        __tmp.put_u8(self.request_id);
26536        __tmp.put_u8(self.uri_type);
26537        for val in &self.uri {
26538            __tmp.put_u8(*val);
26539        }
26540        __tmp.put_u8(self.transfer_type);
26541        for val in &self.storage {
26542            __tmp.put_u8(*val);
26543        }
26544        if matches!(version, MavlinkVersion::V2) {
26545            let len = __tmp.len();
26546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26547        } else {
26548            __tmp.len()
26549        }
26550    }
26551}
26552#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26553#[doc = ""]
26554#[doc = "ID: 413"]
26555#[derive(Debug, Clone, PartialEq)]
26556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26558#[cfg_attr(feature = "ts", derive(TS))]
26559#[cfg_attr(feature = "ts", ts(export))]
26560pub struct RESPONSE_EVENT_ERROR_DATA {
26561    #[doc = "Sequence number."]
26562    pub sequence: u16,
26563    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26564    pub sequence_oldest_available: u16,
26565    #[doc = "System ID"]
26566    pub target_system: u8,
26567    #[doc = "Component ID"]
26568    pub target_component: u8,
26569    #[doc = "Error reason."]
26570    pub reason: MavEventErrorReason,
26571}
26572impl RESPONSE_EVENT_ERROR_DATA {
26573    pub const ENCODED_LEN: usize = 7usize;
26574    pub const DEFAULT: Self = Self {
26575        sequence: 0_u16,
26576        sequence_oldest_available: 0_u16,
26577        target_system: 0_u8,
26578        target_component: 0_u8,
26579        reason: MavEventErrorReason::DEFAULT,
26580    };
26581    #[cfg(feature = "arbitrary")]
26582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26583        use arbitrary::{Arbitrary, Unstructured};
26584        let mut buf = [0u8; 1024];
26585        rng.fill_bytes(&mut buf);
26586        let mut unstructured = Unstructured::new(&buf);
26587        Self::arbitrary(&mut unstructured).unwrap_or_default()
26588    }
26589}
26590impl Default for RESPONSE_EVENT_ERROR_DATA {
26591    fn default() -> Self {
26592        Self::DEFAULT.clone()
26593    }
26594}
26595impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26596    type Message = MavMessage;
26597    const ID: u32 = 413u32;
26598    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26599    const EXTRA_CRC: u8 = 77u8;
26600    const ENCODED_LEN: usize = 7usize;
26601    fn deser(
26602        _version: MavlinkVersion,
26603        __input: &[u8],
26604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26605        let avail_len = __input.len();
26606        let mut payload_buf = [0; Self::ENCODED_LEN];
26607        let mut buf = if avail_len < Self::ENCODED_LEN {
26608            payload_buf[0..avail_len].copy_from_slice(__input);
26609            Bytes::new(&payload_buf)
26610        } else {
26611            Bytes::new(__input)
26612        };
26613        let mut __struct = Self::default();
26614        __struct.sequence = buf.get_u16_le()?;
26615        __struct.sequence_oldest_available = buf.get_u16_le()?;
26616        __struct.target_system = buf.get_u8()?;
26617        __struct.target_component = buf.get_u8()?;
26618        let tmp = buf.get_u8()?;
26619        __struct.reason =
26620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26621                enum_type: "MavEventErrorReason",
26622                value: tmp as u64,
26623            })?;
26624        Ok(__struct)
26625    }
26626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26627        let mut __tmp = BytesMut::new(bytes);
26628        #[allow(clippy::absurd_extreme_comparisons)]
26629        #[allow(unused_comparisons)]
26630        if __tmp.remaining() < Self::ENCODED_LEN {
26631            panic!(
26632                "buffer is too small (need {} bytes, but got {})",
26633                Self::ENCODED_LEN,
26634                __tmp.remaining(),
26635            )
26636        }
26637        __tmp.put_u16_le(self.sequence);
26638        __tmp.put_u16_le(self.sequence_oldest_available);
26639        __tmp.put_u8(self.target_system);
26640        __tmp.put_u8(self.target_component);
26641        __tmp.put_u8(self.reason as u8);
26642        if matches!(version, MavlinkVersion::V2) {
26643            let len = __tmp.len();
26644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26645        } else {
26646            __tmp.len()
26647        }
26648    }
26649}
26650#[doc = "Read out the safety zone the MAV currently assumes."]
26651#[doc = ""]
26652#[doc = "ID: 55"]
26653#[derive(Debug, Clone, PartialEq)]
26654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26656#[cfg_attr(feature = "ts", derive(TS))]
26657#[cfg_attr(feature = "ts", ts(export))]
26658pub struct SAFETY_ALLOWED_AREA_DATA {
26659    #[doc = "x position 1 / Latitude 1"]
26660    pub p1x: f32,
26661    #[doc = "y position 1 / Longitude 1"]
26662    pub p1y: f32,
26663    #[doc = "z position 1 / Altitude 1"]
26664    pub p1z: f32,
26665    #[doc = "x position 2 / Latitude 2"]
26666    pub p2x: f32,
26667    #[doc = "y position 2 / Longitude 2"]
26668    pub p2y: f32,
26669    #[doc = "z position 2 / Altitude 2"]
26670    pub p2z: f32,
26671    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26672    pub frame: MavFrame,
26673}
26674impl SAFETY_ALLOWED_AREA_DATA {
26675    pub const ENCODED_LEN: usize = 25usize;
26676    pub const DEFAULT: Self = Self {
26677        p1x: 0.0_f32,
26678        p1y: 0.0_f32,
26679        p1z: 0.0_f32,
26680        p2x: 0.0_f32,
26681        p2y: 0.0_f32,
26682        p2z: 0.0_f32,
26683        frame: MavFrame::DEFAULT,
26684    };
26685    #[cfg(feature = "arbitrary")]
26686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26687        use arbitrary::{Arbitrary, Unstructured};
26688        let mut buf = [0u8; 1024];
26689        rng.fill_bytes(&mut buf);
26690        let mut unstructured = Unstructured::new(&buf);
26691        Self::arbitrary(&mut unstructured).unwrap_or_default()
26692    }
26693}
26694impl Default for SAFETY_ALLOWED_AREA_DATA {
26695    fn default() -> Self {
26696        Self::DEFAULT.clone()
26697    }
26698}
26699impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26700    type Message = MavMessage;
26701    const ID: u32 = 55u32;
26702    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26703    const EXTRA_CRC: u8 = 3u8;
26704    const ENCODED_LEN: usize = 25usize;
26705    fn deser(
26706        _version: MavlinkVersion,
26707        __input: &[u8],
26708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26709        let avail_len = __input.len();
26710        let mut payload_buf = [0; Self::ENCODED_LEN];
26711        let mut buf = if avail_len < Self::ENCODED_LEN {
26712            payload_buf[0..avail_len].copy_from_slice(__input);
26713            Bytes::new(&payload_buf)
26714        } else {
26715            Bytes::new(__input)
26716        };
26717        let mut __struct = Self::default();
26718        __struct.p1x = buf.get_f32_le()?;
26719        __struct.p1y = buf.get_f32_le()?;
26720        __struct.p1z = buf.get_f32_le()?;
26721        __struct.p2x = buf.get_f32_le()?;
26722        __struct.p2y = buf.get_f32_le()?;
26723        __struct.p2z = buf.get_f32_le()?;
26724        let tmp = buf.get_u8()?;
26725        __struct.frame =
26726            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26727                enum_type: "MavFrame",
26728                value: tmp as u64,
26729            })?;
26730        Ok(__struct)
26731    }
26732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26733        let mut __tmp = BytesMut::new(bytes);
26734        #[allow(clippy::absurd_extreme_comparisons)]
26735        #[allow(unused_comparisons)]
26736        if __tmp.remaining() < Self::ENCODED_LEN {
26737            panic!(
26738                "buffer is too small (need {} bytes, but got {})",
26739                Self::ENCODED_LEN,
26740                __tmp.remaining(),
26741            )
26742        }
26743        __tmp.put_f32_le(self.p1x);
26744        __tmp.put_f32_le(self.p1y);
26745        __tmp.put_f32_le(self.p1z);
26746        __tmp.put_f32_le(self.p2x);
26747        __tmp.put_f32_le(self.p2y);
26748        __tmp.put_f32_le(self.p2z);
26749        __tmp.put_u8(self.frame as u8);
26750        if matches!(version, MavlinkVersion::V2) {
26751            let len = __tmp.len();
26752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26753        } else {
26754            __tmp.len()
26755        }
26756    }
26757}
26758#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26759#[doc = ""]
26760#[doc = "ID: 54"]
26761#[derive(Debug, Clone, PartialEq)]
26762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26764#[cfg_attr(feature = "ts", derive(TS))]
26765#[cfg_attr(feature = "ts", ts(export))]
26766pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26767    #[doc = "x position 1 / Latitude 1"]
26768    pub p1x: f32,
26769    #[doc = "y position 1 / Longitude 1"]
26770    pub p1y: f32,
26771    #[doc = "z position 1 / Altitude 1"]
26772    pub p1z: f32,
26773    #[doc = "x position 2 / Latitude 2"]
26774    pub p2x: f32,
26775    #[doc = "y position 2 / Longitude 2"]
26776    pub p2y: f32,
26777    #[doc = "z position 2 / Altitude 2"]
26778    pub p2z: f32,
26779    #[doc = "System ID"]
26780    pub target_system: u8,
26781    #[doc = "Component ID"]
26782    pub target_component: u8,
26783    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26784    pub frame: MavFrame,
26785}
26786impl SAFETY_SET_ALLOWED_AREA_DATA {
26787    pub const ENCODED_LEN: usize = 27usize;
26788    pub const DEFAULT: Self = Self {
26789        p1x: 0.0_f32,
26790        p1y: 0.0_f32,
26791        p1z: 0.0_f32,
26792        p2x: 0.0_f32,
26793        p2y: 0.0_f32,
26794        p2z: 0.0_f32,
26795        target_system: 0_u8,
26796        target_component: 0_u8,
26797        frame: MavFrame::DEFAULT,
26798    };
26799    #[cfg(feature = "arbitrary")]
26800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26801        use arbitrary::{Arbitrary, Unstructured};
26802        let mut buf = [0u8; 1024];
26803        rng.fill_bytes(&mut buf);
26804        let mut unstructured = Unstructured::new(&buf);
26805        Self::arbitrary(&mut unstructured).unwrap_or_default()
26806    }
26807}
26808impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26809    fn default() -> Self {
26810        Self::DEFAULT.clone()
26811    }
26812}
26813impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26814    type Message = MavMessage;
26815    const ID: u32 = 54u32;
26816    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26817    const EXTRA_CRC: u8 = 15u8;
26818    const ENCODED_LEN: usize = 27usize;
26819    fn deser(
26820        _version: MavlinkVersion,
26821        __input: &[u8],
26822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26823        let avail_len = __input.len();
26824        let mut payload_buf = [0; Self::ENCODED_LEN];
26825        let mut buf = if avail_len < Self::ENCODED_LEN {
26826            payload_buf[0..avail_len].copy_from_slice(__input);
26827            Bytes::new(&payload_buf)
26828        } else {
26829            Bytes::new(__input)
26830        };
26831        let mut __struct = Self::default();
26832        __struct.p1x = buf.get_f32_le()?;
26833        __struct.p1y = buf.get_f32_le()?;
26834        __struct.p1z = buf.get_f32_le()?;
26835        __struct.p2x = buf.get_f32_le()?;
26836        __struct.p2y = buf.get_f32_le()?;
26837        __struct.p2z = buf.get_f32_le()?;
26838        __struct.target_system = buf.get_u8()?;
26839        __struct.target_component = buf.get_u8()?;
26840        let tmp = buf.get_u8()?;
26841        __struct.frame =
26842            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26843                enum_type: "MavFrame",
26844                value: tmp as u64,
26845            })?;
26846        Ok(__struct)
26847    }
26848    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26849        let mut __tmp = BytesMut::new(bytes);
26850        #[allow(clippy::absurd_extreme_comparisons)]
26851        #[allow(unused_comparisons)]
26852        if __tmp.remaining() < Self::ENCODED_LEN {
26853            panic!(
26854                "buffer is too small (need {} bytes, but got {})",
26855                Self::ENCODED_LEN,
26856                __tmp.remaining(),
26857            )
26858        }
26859        __tmp.put_f32_le(self.p1x);
26860        __tmp.put_f32_le(self.p1y);
26861        __tmp.put_f32_le(self.p1z);
26862        __tmp.put_f32_le(self.p2x);
26863        __tmp.put_f32_le(self.p2y);
26864        __tmp.put_f32_le(self.p2z);
26865        __tmp.put_u8(self.target_system);
26866        __tmp.put_u8(self.target_component);
26867        __tmp.put_u8(self.frame as u8);
26868        if matches!(version, MavlinkVersion::V2) {
26869            let len = __tmp.len();
26870            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26871        } else {
26872            __tmp.len()
26873        }
26874    }
26875}
26876#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26877#[doc = ""]
26878#[doc = "ID: 26"]
26879#[derive(Debug, Clone, PartialEq)]
26880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26882#[cfg_attr(feature = "ts", derive(TS))]
26883#[cfg_attr(feature = "ts", ts(export))]
26884pub struct SCALED_IMU_DATA {
26885    #[doc = "Timestamp (time since system boot)."]
26886    pub time_boot_ms: u32,
26887    #[doc = "X acceleration"]
26888    pub xacc: i16,
26889    #[doc = "Y acceleration"]
26890    pub yacc: i16,
26891    #[doc = "Z acceleration"]
26892    pub zacc: i16,
26893    #[doc = "Angular speed around X axis"]
26894    pub xgyro: i16,
26895    #[doc = "Angular speed around Y axis"]
26896    pub ygyro: i16,
26897    #[doc = "Angular speed around Z axis"]
26898    pub zgyro: i16,
26899    #[doc = "X Magnetic field"]
26900    pub xmag: i16,
26901    #[doc = "Y Magnetic field"]
26902    pub ymag: i16,
26903    #[doc = "Z Magnetic field"]
26904    pub zmag: i16,
26905    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26906    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26907    pub temperature: i16,
26908}
26909impl SCALED_IMU_DATA {
26910    pub const ENCODED_LEN: usize = 24usize;
26911    pub const DEFAULT: Self = Self {
26912        time_boot_ms: 0_u32,
26913        xacc: 0_i16,
26914        yacc: 0_i16,
26915        zacc: 0_i16,
26916        xgyro: 0_i16,
26917        ygyro: 0_i16,
26918        zgyro: 0_i16,
26919        xmag: 0_i16,
26920        ymag: 0_i16,
26921        zmag: 0_i16,
26922        temperature: 0_i16,
26923    };
26924    #[cfg(feature = "arbitrary")]
26925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26926        use arbitrary::{Arbitrary, Unstructured};
26927        let mut buf = [0u8; 1024];
26928        rng.fill_bytes(&mut buf);
26929        let mut unstructured = Unstructured::new(&buf);
26930        Self::arbitrary(&mut unstructured).unwrap_or_default()
26931    }
26932}
26933impl Default for SCALED_IMU_DATA {
26934    fn default() -> Self {
26935        Self::DEFAULT.clone()
26936    }
26937}
26938impl MessageData for SCALED_IMU_DATA {
26939    type Message = MavMessage;
26940    const ID: u32 = 26u32;
26941    const NAME: &'static str = "SCALED_IMU";
26942    const EXTRA_CRC: u8 = 170u8;
26943    const ENCODED_LEN: usize = 24usize;
26944    fn deser(
26945        _version: MavlinkVersion,
26946        __input: &[u8],
26947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26948        let avail_len = __input.len();
26949        let mut payload_buf = [0; Self::ENCODED_LEN];
26950        let mut buf = if avail_len < Self::ENCODED_LEN {
26951            payload_buf[0..avail_len].copy_from_slice(__input);
26952            Bytes::new(&payload_buf)
26953        } else {
26954            Bytes::new(__input)
26955        };
26956        let mut __struct = Self::default();
26957        __struct.time_boot_ms = buf.get_u32_le()?;
26958        __struct.xacc = buf.get_i16_le()?;
26959        __struct.yacc = buf.get_i16_le()?;
26960        __struct.zacc = buf.get_i16_le()?;
26961        __struct.xgyro = buf.get_i16_le()?;
26962        __struct.ygyro = buf.get_i16_le()?;
26963        __struct.zgyro = buf.get_i16_le()?;
26964        __struct.xmag = buf.get_i16_le()?;
26965        __struct.ymag = buf.get_i16_le()?;
26966        __struct.zmag = buf.get_i16_le()?;
26967        __struct.temperature = buf.get_i16_le()?;
26968        Ok(__struct)
26969    }
26970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26971        let mut __tmp = BytesMut::new(bytes);
26972        #[allow(clippy::absurd_extreme_comparisons)]
26973        #[allow(unused_comparisons)]
26974        if __tmp.remaining() < Self::ENCODED_LEN {
26975            panic!(
26976                "buffer is too small (need {} bytes, but got {})",
26977                Self::ENCODED_LEN,
26978                __tmp.remaining(),
26979            )
26980        }
26981        __tmp.put_u32_le(self.time_boot_ms);
26982        __tmp.put_i16_le(self.xacc);
26983        __tmp.put_i16_le(self.yacc);
26984        __tmp.put_i16_le(self.zacc);
26985        __tmp.put_i16_le(self.xgyro);
26986        __tmp.put_i16_le(self.ygyro);
26987        __tmp.put_i16_le(self.zgyro);
26988        __tmp.put_i16_le(self.xmag);
26989        __tmp.put_i16_le(self.ymag);
26990        __tmp.put_i16_le(self.zmag);
26991        if matches!(version, MavlinkVersion::V2) {
26992            __tmp.put_i16_le(self.temperature);
26993            let len = __tmp.len();
26994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26995        } else {
26996            __tmp.len()
26997        }
26998    }
26999}
27000#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27001#[doc = ""]
27002#[doc = "ID: 116"]
27003#[derive(Debug, Clone, PartialEq)]
27004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27006#[cfg_attr(feature = "ts", derive(TS))]
27007#[cfg_attr(feature = "ts", ts(export))]
27008pub struct SCALED_IMU2_DATA {
27009    #[doc = "Timestamp (time since system boot)."]
27010    pub time_boot_ms: u32,
27011    #[doc = "X acceleration"]
27012    pub xacc: i16,
27013    #[doc = "Y acceleration"]
27014    pub yacc: i16,
27015    #[doc = "Z acceleration"]
27016    pub zacc: i16,
27017    #[doc = "Angular speed around X axis"]
27018    pub xgyro: i16,
27019    #[doc = "Angular speed around Y axis"]
27020    pub ygyro: i16,
27021    #[doc = "Angular speed around Z axis"]
27022    pub zgyro: i16,
27023    #[doc = "X Magnetic field"]
27024    pub xmag: i16,
27025    #[doc = "Y Magnetic field"]
27026    pub ymag: i16,
27027    #[doc = "Z Magnetic field"]
27028    pub zmag: i16,
27029    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27030    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27031    pub temperature: i16,
27032}
27033impl SCALED_IMU2_DATA {
27034    pub const ENCODED_LEN: usize = 24usize;
27035    pub const DEFAULT: Self = Self {
27036        time_boot_ms: 0_u32,
27037        xacc: 0_i16,
27038        yacc: 0_i16,
27039        zacc: 0_i16,
27040        xgyro: 0_i16,
27041        ygyro: 0_i16,
27042        zgyro: 0_i16,
27043        xmag: 0_i16,
27044        ymag: 0_i16,
27045        zmag: 0_i16,
27046        temperature: 0_i16,
27047    };
27048    #[cfg(feature = "arbitrary")]
27049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27050        use arbitrary::{Arbitrary, Unstructured};
27051        let mut buf = [0u8; 1024];
27052        rng.fill_bytes(&mut buf);
27053        let mut unstructured = Unstructured::new(&buf);
27054        Self::arbitrary(&mut unstructured).unwrap_or_default()
27055    }
27056}
27057impl Default for SCALED_IMU2_DATA {
27058    fn default() -> Self {
27059        Self::DEFAULT.clone()
27060    }
27061}
27062impl MessageData for SCALED_IMU2_DATA {
27063    type Message = MavMessage;
27064    const ID: u32 = 116u32;
27065    const NAME: &'static str = "SCALED_IMU2";
27066    const EXTRA_CRC: u8 = 76u8;
27067    const ENCODED_LEN: usize = 24usize;
27068    fn deser(
27069        _version: MavlinkVersion,
27070        __input: &[u8],
27071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27072        let avail_len = __input.len();
27073        let mut payload_buf = [0; Self::ENCODED_LEN];
27074        let mut buf = if avail_len < Self::ENCODED_LEN {
27075            payload_buf[0..avail_len].copy_from_slice(__input);
27076            Bytes::new(&payload_buf)
27077        } else {
27078            Bytes::new(__input)
27079        };
27080        let mut __struct = Self::default();
27081        __struct.time_boot_ms = buf.get_u32_le()?;
27082        __struct.xacc = buf.get_i16_le()?;
27083        __struct.yacc = buf.get_i16_le()?;
27084        __struct.zacc = buf.get_i16_le()?;
27085        __struct.xgyro = buf.get_i16_le()?;
27086        __struct.ygyro = buf.get_i16_le()?;
27087        __struct.zgyro = buf.get_i16_le()?;
27088        __struct.xmag = buf.get_i16_le()?;
27089        __struct.ymag = buf.get_i16_le()?;
27090        __struct.zmag = buf.get_i16_le()?;
27091        __struct.temperature = buf.get_i16_le()?;
27092        Ok(__struct)
27093    }
27094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27095        let mut __tmp = BytesMut::new(bytes);
27096        #[allow(clippy::absurd_extreme_comparisons)]
27097        #[allow(unused_comparisons)]
27098        if __tmp.remaining() < Self::ENCODED_LEN {
27099            panic!(
27100                "buffer is too small (need {} bytes, but got {})",
27101                Self::ENCODED_LEN,
27102                __tmp.remaining(),
27103            )
27104        }
27105        __tmp.put_u32_le(self.time_boot_ms);
27106        __tmp.put_i16_le(self.xacc);
27107        __tmp.put_i16_le(self.yacc);
27108        __tmp.put_i16_le(self.zacc);
27109        __tmp.put_i16_le(self.xgyro);
27110        __tmp.put_i16_le(self.ygyro);
27111        __tmp.put_i16_le(self.zgyro);
27112        __tmp.put_i16_le(self.xmag);
27113        __tmp.put_i16_le(self.ymag);
27114        __tmp.put_i16_le(self.zmag);
27115        if matches!(version, MavlinkVersion::V2) {
27116            __tmp.put_i16_le(self.temperature);
27117            let len = __tmp.len();
27118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27119        } else {
27120            __tmp.len()
27121        }
27122    }
27123}
27124#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27125#[doc = ""]
27126#[doc = "ID: 129"]
27127#[derive(Debug, Clone, PartialEq)]
27128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27130#[cfg_attr(feature = "ts", derive(TS))]
27131#[cfg_attr(feature = "ts", ts(export))]
27132pub struct SCALED_IMU3_DATA {
27133    #[doc = "Timestamp (time since system boot)."]
27134    pub time_boot_ms: u32,
27135    #[doc = "X acceleration"]
27136    pub xacc: i16,
27137    #[doc = "Y acceleration"]
27138    pub yacc: i16,
27139    #[doc = "Z acceleration"]
27140    pub zacc: i16,
27141    #[doc = "Angular speed around X axis"]
27142    pub xgyro: i16,
27143    #[doc = "Angular speed around Y axis"]
27144    pub ygyro: i16,
27145    #[doc = "Angular speed around Z axis"]
27146    pub zgyro: i16,
27147    #[doc = "X Magnetic field"]
27148    pub xmag: i16,
27149    #[doc = "Y Magnetic field"]
27150    pub ymag: i16,
27151    #[doc = "Z Magnetic field"]
27152    pub zmag: i16,
27153    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27154    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27155    pub temperature: i16,
27156}
27157impl SCALED_IMU3_DATA {
27158    pub const ENCODED_LEN: usize = 24usize;
27159    pub const DEFAULT: Self = Self {
27160        time_boot_ms: 0_u32,
27161        xacc: 0_i16,
27162        yacc: 0_i16,
27163        zacc: 0_i16,
27164        xgyro: 0_i16,
27165        ygyro: 0_i16,
27166        zgyro: 0_i16,
27167        xmag: 0_i16,
27168        ymag: 0_i16,
27169        zmag: 0_i16,
27170        temperature: 0_i16,
27171    };
27172    #[cfg(feature = "arbitrary")]
27173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27174        use arbitrary::{Arbitrary, Unstructured};
27175        let mut buf = [0u8; 1024];
27176        rng.fill_bytes(&mut buf);
27177        let mut unstructured = Unstructured::new(&buf);
27178        Self::arbitrary(&mut unstructured).unwrap_or_default()
27179    }
27180}
27181impl Default for SCALED_IMU3_DATA {
27182    fn default() -> Self {
27183        Self::DEFAULT.clone()
27184    }
27185}
27186impl MessageData for SCALED_IMU3_DATA {
27187    type Message = MavMessage;
27188    const ID: u32 = 129u32;
27189    const NAME: &'static str = "SCALED_IMU3";
27190    const EXTRA_CRC: u8 = 46u8;
27191    const ENCODED_LEN: usize = 24usize;
27192    fn deser(
27193        _version: MavlinkVersion,
27194        __input: &[u8],
27195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27196        let avail_len = __input.len();
27197        let mut payload_buf = [0; Self::ENCODED_LEN];
27198        let mut buf = if avail_len < Self::ENCODED_LEN {
27199            payload_buf[0..avail_len].copy_from_slice(__input);
27200            Bytes::new(&payload_buf)
27201        } else {
27202            Bytes::new(__input)
27203        };
27204        let mut __struct = Self::default();
27205        __struct.time_boot_ms = buf.get_u32_le()?;
27206        __struct.xacc = buf.get_i16_le()?;
27207        __struct.yacc = buf.get_i16_le()?;
27208        __struct.zacc = buf.get_i16_le()?;
27209        __struct.xgyro = buf.get_i16_le()?;
27210        __struct.ygyro = buf.get_i16_le()?;
27211        __struct.zgyro = buf.get_i16_le()?;
27212        __struct.xmag = buf.get_i16_le()?;
27213        __struct.ymag = buf.get_i16_le()?;
27214        __struct.zmag = buf.get_i16_le()?;
27215        __struct.temperature = buf.get_i16_le()?;
27216        Ok(__struct)
27217    }
27218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27219        let mut __tmp = BytesMut::new(bytes);
27220        #[allow(clippy::absurd_extreme_comparisons)]
27221        #[allow(unused_comparisons)]
27222        if __tmp.remaining() < Self::ENCODED_LEN {
27223            panic!(
27224                "buffer is too small (need {} bytes, but got {})",
27225                Self::ENCODED_LEN,
27226                __tmp.remaining(),
27227            )
27228        }
27229        __tmp.put_u32_le(self.time_boot_ms);
27230        __tmp.put_i16_le(self.xacc);
27231        __tmp.put_i16_le(self.yacc);
27232        __tmp.put_i16_le(self.zacc);
27233        __tmp.put_i16_le(self.xgyro);
27234        __tmp.put_i16_le(self.ygyro);
27235        __tmp.put_i16_le(self.zgyro);
27236        __tmp.put_i16_le(self.xmag);
27237        __tmp.put_i16_le(self.ymag);
27238        __tmp.put_i16_le(self.zmag);
27239        if matches!(version, MavlinkVersion::V2) {
27240            __tmp.put_i16_le(self.temperature);
27241            let len = __tmp.len();
27242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27243        } else {
27244            __tmp.len()
27245        }
27246    }
27247}
27248#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27249#[doc = ""]
27250#[doc = "ID: 29"]
27251#[derive(Debug, Clone, PartialEq)]
27252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27254#[cfg_attr(feature = "ts", derive(TS))]
27255#[cfg_attr(feature = "ts", ts(export))]
27256pub struct SCALED_PRESSURE_DATA {
27257    #[doc = "Timestamp (time since system boot)."]
27258    pub time_boot_ms: u32,
27259    #[doc = "Absolute pressure"]
27260    pub press_abs: f32,
27261    #[doc = "Differential pressure 1"]
27262    pub press_diff: f32,
27263    #[doc = "Absolute pressure temperature"]
27264    pub temperature: i16,
27265    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27266    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27267    pub temperature_press_diff: i16,
27268}
27269impl SCALED_PRESSURE_DATA {
27270    pub const ENCODED_LEN: usize = 16usize;
27271    pub const DEFAULT: Self = Self {
27272        time_boot_ms: 0_u32,
27273        press_abs: 0.0_f32,
27274        press_diff: 0.0_f32,
27275        temperature: 0_i16,
27276        temperature_press_diff: 0_i16,
27277    };
27278    #[cfg(feature = "arbitrary")]
27279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27280        use arbitrary::{Arbitrary, Unstructured};
27281        let mut buf = [0u8; 1024];
27282        rng.fill_bytes(&mut buf);
27283        let mut unstructured = Unstructured::new(&buf);
27284        Self::arbitrary(&mut unstructured).unwrap_or_default()
27285    }
27286}
27287impl Default for SCALED_PRESSURE_DATA {
27288    fn default() -> Self {
27289        Self::DEFAULT.clone()
27290    }
27291}
27292impl MessageData for SCALED_PRESSURE_DATA {
27293    type Message = MavMessage;
27294    const ID: u32 = 29u32;
27295    const NAME: &'static str = "SCALED_PRESSURE";
27296    const EXTRA_CRC: u8 = 115u8;
27297    const ENCODED_LEN: usize = 16usize;
27298    fn deser(
27299        _version: MavlinkVersion,
27300        __input: &[u8],
27301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27302        let avail_len = __input.len();
27303        let mut payload_buf = [0; Self::ENCODED_LEN];
27304        let mut buf = if avail_len < Self::ENCODED_LEN {
27305            payload_buf[0..avail_len].copy_from_slice(__input);
27306            Bytes::new(&payload_buf)
27307        } else {
27308            Bytes::new(__input)
27309        };
27310        let mut __struct = Self::default();
27311        __struct.time_boot_ms = buf.get_u32_le()?;
27312        __struct.press_abs = buf.get_f32_le()?;
27313        __struct.press_diff = buf.get_f32_le()?;
27314        __struct.temperature = buf.get_i16_le()?;
27315        __struct.temperature_press_diff = buf.get_i16_le()?;
27316        Ok(__struct)
27317    }
27318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27319        let mut __tmp = BytesMut::new(bytes);
27320        #[allow(clippy::absurd_extreme_comparisons)]
27321        #[allow(unused_comparisons)]
27322        if __tmp.remaining() < Self::ENCODED_LEN {
27323            panic!(
27324                "buffer is too small (need {} bytes, but got {})",
27325                Self::ENCODED_LEN,
27326                __tmp.remaining(),
27327            )
27328        }
27329        __tmp.put_u32_le(self.time_boot_ms);
27330        __tmp.put_f32_le(self.press_abs);
27331        __tmp.put_f32_le(self.press_diff);
27332        __tmp.put_i16_le(self.temperature);
27333        if matches!(version, MavlinkVersion::V2) {
27334            __tmp.put_i16_le(self.temperature_press_diff);
27335            let len = __tmp.len();
27336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27337        } else {
27338            __tmp.len()
27339        }
27340    }
27341}
27342#[doc = "Barometer readings for 2nd barometer."]
27343#[doc = ""]
27344#[doc = "ID: 137"]
27345#[derive(Debug, Clone, PartialEq)]
27346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27348#[cfg_attr(feature = "ts", derive(TS))]
27349#[cfg_attr(feature = "ts", ts(export))]
27350pub struct SCALED_PRESSURE2_DATA {
27351    #[doc = "Timestamp (time since system boot)."]
27352    pub time_boot_ms: u32,
27353    #[doc = "Absolute pressure"]
27354    pub press_abs: f32,
27355    #[doc = "Differential pressure"]
27356    pub press_diff: f32,
27357    #[doc = "Absolute pressure temperature"]
27358    pub temperature: i16,
27359    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27360    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27361    pub temperature_press_diff: i16,
27362}
27363impl SCALED_PRESSURE2_DATA {
27364    pub const ENCODED_LEN: usize = 16usize;
27365    pub const DEFAULT: Self = Self {
27366        time_boot_ms: 0_u32,
27367        press_abs: 0.0_f32,
27368        press_diff: 0.0_f32,
27369        temperature: 0_i16,
27370        temperature_press_diff: 0_i16,
27371    };
27372    #[cfg(feature = "arbitrary")]
27373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27374        use arbitrary::{Arbitrary, Unstructured};
27375        let mut buf = [0u8; 1024];
27376        rng.fill_bytes(&mut buf);
27377        let mut unstructured = Unstructured::new(&buf);
27378        Self::arbitrary(&mut unstructured).unwrap_or_default()
27379    }
27380}
27381impl Default for SCALED_PRESSURE2_DATA {
27382    fn default() -> Self {
27383        Self::DEFAULT.clone()
27384    }
27385}
27386impl MessageData for SCALED_PRESSURE2_DATA {
27387    type Message = MavMessage;
27388    const ID: u32 = 137u32;
27389    const NAME: &'static str = "SCALED_PRESSURE2";
27390    const EXTRA_CRC: u8 = 195u8;
27391    const ENCODED_LEN: usize = 16usize;
27392    fn deser(
27393        _version: MavlinkVersion,
27394        __input: &[u8],
27395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27396        let avail_len = __input.len();
27397        let mut payload_buf = [0; Self::ENCODED_LEN];
27398        let mut buf = if avail_len < Self::ENCODED_LEN {
27399            payload_buf[0..avail_len].copy_from_slice(__input);
27400            Bytes::new(&payload_buf)
27401        } else {
27402            Bytes::new(__input)
27403        };
27404        let mut __struct = Self::default();
27405        __struct.time_boot_ms = buf.get_u32_le()?;
27406        __struct.press_abs = buf.get_f32_le()?;
27407        __struct.press_diff = buf.get_f32_le()?;
27408        __struct.temperature = buf.get_i16_le()?;
27409        __struct.temperature_press_diff = buf.get_i16_le()?;
27410        Ok(__struct)
27411    }
27412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27413        let mut __tmp = BytesMut::new(bytes);
27414        #[allow(clippy::absurd_extreme_comparisons)]
27415        #[allow(unused_comparisons)]
27416        if __tmp.remaining() < Self::ENCODED_LEN {
27417            panic!(
27418                "buffer is too small (need {} bytes, but got {})",
27419                Self::ENCODED_LEN,
27420                __tmp.remaining(),
27421            )
27422        }
27423        __tmp.put_u32_le(self.time_boot_ms);
27424        __tmp.put_f32_le(self.press_abs);
27425        __tmp.put_f32_le(self.press_diff);
27426        __tmp.put_i16_le(self.temperature);
27427        if matches!(version, MavlinkVersion::V2) {
27428            __tmp.put_i16_le(self.temperature_press_diff);
27429            let len = __tmp.len();
27430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27431        } else {
27432            __tmp.len()
27433        }
27434    }
27435}
27436#[doc = "Barometer readings for 3rd barometer."]
27437#[doc = ""]
27438#[doc = "ID: 143"]
27439#[derive(Debug, Clone, PartialEq)]
27440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27442#[cfg_attr(feature = "ts", derive(TS))]
27443#[cfg_attr(feature = "ts", ts(export))]
27444pub struct SCALED_PRESSURE3_DATA {
27445    #[doc = "Timestamp (time since system boot)."]
27446    pub time_boot_ms: u32,
27447    #[doc = "Absolute pressure"]
27448    pub press_abs: f32,
27449    #[doc = "Differential pressure"]
27450    pub press_diff: f32,
27451    #[doc = "Absolute pressure temperature"]
27452    pub temperature: i16,
27453    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27454    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27455    pub temperature_press_diff: i16,
27456}
27457impl SCALED_PRESSURE3_DATA {
27458    pub const ENCODED_LEN: usize = 16usize;
27459    pub const DEFAULT: Self = Self {
27460        time_boot_ms: 0_u32,
27461        press_abs: 0.0_f32,
27462        press_diff: 0.0_f32,
27463        temperature: 0_i16,
27464        temperature_press_diff: 0_i16,
27465    };
27466    #[cfg(feature = "arbitrary")]
27467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27468        use arbitrary::{Arbitrary, Unstructured};
27469        let mut buf = [0u8; 1024];
27470        rng.fill_bytes(&mut buf);
27471        let mut unstructured = Unstructured::new(&buf);
27472        Self::arbitrary(&mut unstructured).unwrap_or_default()
27473    }
27474}
27475impl Default for SCALED_PRESSURE3_DATA {
27476    fn default() -> Self {
27477        Self::DEFAULT.clone()
27478    }
27479}
27480impl MessageData for SCALED_PRESSURE3_DATA {
27481    type Message = MavMessage;
27482    const ID: u32 = 143u32;
27483    const NAME: &'static str = "SCALED_PRESSURE3";
27484    const EXTRA_CRC: u8 = 131u8;
27485    const ENCODED_LEN: usize = 16usize;
27486    fn deser(
27487        _version: MavlinkVersion,
27488        __input: &[u8],
27489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27490        let avail_len = __input.len();
27491        let mut payload_buf = [0; Self::ENCODED_LEN];
27492        let mut buf = if avail_len < Self::ENCODED_LEN {
27493            payload_buf[0..avail_len].copy_from_slice(__input);
27494            Bytes::new(&payload_buf)
27495        } else {
27496            Bytes::new(__input)
27497        };
27498        let mut __struct = Self::default();
27499        __struct.time_boot_ms = buf.get_u32_le()?;
27500        __struct.press_abs = buf.get_f32_le()?;
27501        __struct.press_diff = buf.get_f32_le()?;
27502        __struct.temperature = buf.get_i16_le()?;
27503        __struct.temperature_press_diff = buf.get_i16_le()?;
27504        Ok(__struct)
27505    }
27506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27507        let mut __tmp = BytesMut::new(bytes);
27508        #[allow(clippy::absurd_extreme_comparisons)]
27509        #[allow(unused_comparisons)]
27510        if __tmp.remaining() < Self::ENCODED_LEN {
27511            panic!(
27512                "buffer is too small (need {} bytes, but got {})",
27513                Self::ENCODED_LEN,
27514                __tmp.remaining(),
27515            )
27516        }
27517        __tmp.put_u32_le(self.time_boot_ms);
27518        __tmp.put_f32_le(self.press_abs);
27519        __tmp.put_f32_le(self.press_diff);
27520        __tmp.put_i16_le(self.temperature);
27521        if matches!(version, MavlinkVersion::V2) {
27522            __tmp.put_i16_le(self.temperature_press_diff);
27523            let len = __tmp.len();
27524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27525        } else {
27526            __tmp.len()
27527        }
27528    }
27529}
27530#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27531#[doc = ""]
27532#[doc = "ID: 126"]
27533#[derive(Debug, Clone, PartialEq)]
27534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27536#[cfg_attr(feature = "ts", derive(TS))]
27537#[cfg_attr(feature = "ts", ts(export))]
27538pub struct SERIAL_CONTROL_DATA {
27539    #[doc = "Baudrate of transfer. Zero means no change."]
27540    pub baudrate: u32,
27541    #[doc = "Timeout for reply data"]
27542    pub timeout: u16,
27543    #[doc = "Serial control device type."]
27544    pub device: SerialControlDev,
27545    #[doc = "Bitmap of serial control flags."]
27546    pub flags: SerialControlFlag,
27547    #[doc = "how many bytes in this transfer"]
27548    pub count: u8,
27549    #[doc = "serial data"]
27550    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27551    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27552    pub data: [u8; 70],
27553    #[doc = "System ID"]
27554    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27555    pub target_system: u8,
27556    #[doc = "Component ID"]
27557    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27558    pub target_component: u8,
27559}
27560impl SERIAL_CONTROL_DATA {
27561    pub const ENCODED_LEN: usize = 81usize;
27562    pub const DEFAULT: Self = Self {
27563        baudrate: 0_u32,
27564        timeout: 0_u16,
27565        device: SerialControlDev::DEFAULT,
27566        flags: SerialControlFlag::DEFAULT,
27567        count: 0_u8,
27568        data: [0_u8; 70usize],
27569        target_system: 0_u8,
27570        target_component: 0_u8,
27571    };
27572    #[cfg(feature = "arbitrary")]
27573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27574        use arbitrary::{Arbitrary, Unstructured};
27575        let mut buf = [0u8; 1024];
27576        rng.fill_bytes(&mut buf);
27577        let mut unstructured = Unstructured::new(&buf);
27578        Self::arbitrary(&mut unstructured).unwrap_or_default()
27579    }
27580}
27581impl Default for SERIAL_CONTROL_DATA {
27582    fn default() -> Self {
27583        Self::DEFAULT.clone()
27584    }
27585}
27586impl MessageData for SERIAL_CONTROL_DATA {
27587    type Message = MavMessage;
27588    const ID: u32 = 126u32;
27589    const NAME: &'static str = "SERIAL_CONTROL";
27590    const EXTRA_CRC: u8 = 220u8;
27591    const ENCODED_LEN: usize = 81usize;
27592    fn deser(
27593        _version: MavlinkVersion,
27594        __input: &[u8],
27595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27596        let avail_len = __input.len();
27597        let mut payload_buf = [0; Self::ENCODED_LEN];
27598        let mut buf = if avail_len < Self::ENCODED_LEN {
27599            payload_buf[0..avail_len].copy_from_slice(__input);
27600            Bytes::new(&payload_buf)
27601        } else {
27602            Bytes::new(__input)
27603        };
27604        let mut __struct = Self::default();
27605        __struct.baudrate = buf.get_u32_le()?;
27606        __struct.timeout = buf.get_u16_le()?;
27607        let tmp = buf.get_u8()?;
27608        __struct.device =
27609            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27610                enum_type: "SerialControlDev",
27611                value: tmp as u64,
27612            })?;
27613        let tmp = buf.get_u8()?;
27614        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27615            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27616                flag_type: "SerialControlFlag",
27617                value: tmp as u64,
27618            })?;
27619        __struct.count = buf.get_u8()?;
27620        for v in &mut __struct.data {
27621            let val = buf.get_u8()?;
27622            *v = val;
27623        }
27624        __struct.target_system = buf.get_u8()?;
27625        __struct.target_component = buf.get_u8()?;
27626        Ok(__struct)
27627    }
27628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27629        let mut __tmp = BytesMut::new(bytes);
27630        #[allow(clippy::absurd_extreme_comparisons)]
27631        #[allow(unused_comparisons)]
27632        if __tmp.remaining() < Self::ENCODED_LEN {
27633            panic!(
27634                "buffer is too small (need {} bytes, but got {})",
27635                Self::ENCODED_LEN,
27636                __tmp.remaining(),
27637            )
27638        }
27639        __tmp.put_u32_le(self.baudrate);
27640        __tmp.put_u16_le(self.timeout);
27641        __tmp.put_u8(self.device as u8);
27642        __tmp.put_u8(self.flags.bits() as u8);
27643        __tmp.put_u8(self.count);
27644        for val in &self.data {
27645            __tmp.put_u8(*val);
27646        }
27647        if matches!(version, MavlinkVersion::V2) {
27648            __tmp.put_u8(self.target_system);
27649            __tmp.put_u8(self.target_component);
27650            let len = __tmp.len();
27651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27652        } else {
27653            __tmp.len()
27654        }
27655    }
27656}
27657#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27658#[doc = ""]
27659#[doc = "ID: 36"]
27660#[derive(Debug, Clone, PartialEq)]
27661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27663#[cfg_attr(feature = "ts", derive(TS))]
27664#[cfg_attr(feature = "ts", ts(export))]
27665pub struct SERVO_OUTPUT_RAW_DATA {
27666    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27667    pub time_usec: u32,
27668    #[doc = "Servo output 1 value"]
27669    pub servo1_raw: u16,
27670    #[doc = "Servo output 2 value"]
27671    pub servo2_raw: u16,
27672    #[doc = "Servo output 3 value"]
27673    pub servo3_raw: u16,
27674    #[doc = "Servo output 4 value"]
27675    pub servo4_raw: u16,
27676    #[doc = "Servo output 5 value"]
27677    pub servo5_raw: u16,
27678    #[doc = "Servo output 6 value"]
27679    pub servo6_raw: u16,
27680    #[doc = "Servo output 7 value"]
27681    pub servo7_raw: u16,
27682    #[doc = "Servo output 8 value"]
27683    pub servo8_raw: u16,
27684    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27685    pub port: u8,
27686    #[doc = "Servo output 9 value"]
27687    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27688    pub servo9_raw: u16,
27689    #[doc = "Servo output 10 value"]
27690    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27691    pub servo10_raw: u16,
27692    #[doc = "Servo output 11 value"]
27693    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27694    pub servo11_raw: u16,
27695    #[doc = "Servo output 12 value"]
27696    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27697    pub servo12_raw: u16,
27698    #[doc = "Servo output 13 value"]
27699    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27700    pub servo13_raw: u16,
27701    #[doc = "Servo output 14 value"]
27702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27703    pub servo14_raw: u16,
27704    #[doc = "Servo output 15 value"]
27705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27706    pub servo15_raw: u16,
27707    #[doc = "Servo output 16 value"]
27708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27709    pub servo16_raw: u16,
27710}
27711impl SERVO_OUTPUT_RAW_DATA {
27712    pub const ENCODED_LEN: usize = 37usize;
27713    pub const DEFAULT: Self = Self {
27714        time_usec: 0_u32,
27715        servo1_raw: 0_u16,
27716        servo2_raw: 0_u16,
27717        servo3_raw: 0_u16,
27718        servo4_raw: 0_u16,
27719        servo5_raw: 0_u16,
27720        servo6_raw: 0_u16,
27721        servo7_raw: 0_u16,
27722        servo8_raw: 0_u16,
27723        port: 0_u8,
27724        servo9_raw: 0_u16,
27725        servo10_raw: 0_u16,
27726        servo11_raw: 0_u16,
27727        servo12_raw: 0_u16,
27728        servo13_raw: 0_u16,
27729        servo14_raw: 0_u16,
27730        servo15_raw: 0_u16,
27731        servo16_raw: 0_u16,
27732    };
27733    #[cfg(feature = "arbitrary")]
27734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27735        use arbitrary::{Arbitrary, Unstructured};
27736        let mut buf = [0u8; 1024];
27737        rng.fill_bytes(&mut buf);
27738        let mut unstructured = Unstructured::new(&buf);
27739        Self::arbitrary(&mut unstructured).unwrap_or_default()
27740    }
27741}
27742impl Default for SERVO_OUTPUT_RAW_DATA {
27743    fn default() -> Self {
27744        Self::DEFAULT.clone()
27745    }
27746}
27747impl MessageData for SERVO_OUTPUT_RAW_DATA {
27748    type Message = MavMessage;
27749    const ID: u32 = 36u32;
27750    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27751    const EXTRA_CRC: u8 = 222u8;
27752    const ENCODED_LEN: usize = 37usize;
27753    fn deser(
27754        _version: MavlinkVersion,
27755        __input: &[u8],
27756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27757        let avail_len = __input.len();
27758        let mut payload_buf = [0; Self::ENCODED_LEN];
27759        let mut buf = if avail_len < Self::ENCODED_LEN {
27760            payload_buf[0..avail_len].copy_from_slice(__input);
27761            Bytes::new(&payload_buf)
27762        } else {
27763            Bytes::new(__input)
27764        };
27765        let mut __struct = Self::default();
27766        __struct.time_usec = buf.get_u32_le()?;
27767        __struct.servo1_raw = buf.get_u16_le()?;
27768        __struct.servo2_raw = buf.get_u16_le()?;
27769        __struct.servo3_raw = buf.get_u16_le()?;
27770        __struct.servo4_raw = buf.get_u16_le()?;
27771        __struct.servo5_raw = buf.get_u16_le()?;
27772        __struct.servo6_raw = buf.get_u16_le()?;
27773        __struct.servo7_raw = buf.get_u16_le()?;
27774        __struct.servo8_raw = buf.get_u16_le()?;
27775        __struct.port = buf.get_u8()?;
27776        __struct.servo9_raw = buf.get_u16_le()?;
27777        __struct.servo10_raw = buf.get_u16_le()?;
27778        __struct.servo11_raw = buf.get_u16_le()?;
27779        __struct.servo12_raw = buf.get_u16_le()?;
27780        __struct.servo13_raw = buf.get_u16_le()?;
27781        __struct.servo14_raw = buf.get_u16_le()?;
27782        __struct.servo15_raw = buf.get_u16_le()?;
27783        __struct.servo16_raw = buf.get_u16_le()?;
27784        Ok(__struct)
27785    }
27786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27787        let mut __tmp = BytesMut::new(bytes);
27788        #[allow(clippy::absurd_extreme_comparisons)]
27789        #[allow(unused_comparisons)]
27790        if __tmp.remaining() < Self::ENCODED_LEN {
27791            panic!(
27792                "buffer is too small (need {} bytes, but got {})",
27793                Self::ENCODED_LEN,
27794                __tmp.remaining(),
27795            )
27796        }
27797        __tmp.put_u32_le(self.time_usec);
27798        __tmp.put_u16_le(self.servo1_raw);
27799        __tmp.put_u16_le(self.servo2_raw);
27800        __tmp.put_u16_le(self.servo3_raw);
27801        __tmp.put_u16_le(self.servo4_raw);
27802        __tmp.put_u16_le(self.servo5_raw);
27803        __tmp.put_u16_le(self.servo6_raw);
27804        __tmp.put_u16_le(self.servo7_raw);
27805        __tmp.put_u16_le(self.servo8_raw);
27806        __tmp.put_u8(self.port);
27807        if matches!(version, MavlinkVersion::V2) {
27808            __tmp.put_u16_le(self.servo9_raw);
27809            __tmp.put_u16_le(self.servo10_raw);
27810            __tmp.put_u16_le(self.servo11_raw);
27811            __tmp.put_u16_le(self.servo12_raw);
27812            __tmp.put_u16_le(self.servo13_raw);
27813            __tmp.put_u16_le(self.servo14_raw);
27814            __tmp.put_u16_le(self.servo15_raw);
27815            __tmp.put_u16_le(self.servo16_raw);
27816            let len = __tmp.len();
27817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27818        } else {
27819            __tmp.len()
27820        }
27821    }
27822}
27823#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27824#[doc = ""]
27825#[doc = "ID: 256"]
27826#[derive(Debug, Clone, PartialEq)]
27827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27829#[cfg_attr(feature = "ts", derive(TS))]
27830#[cfg_attr(feature = "ts", ts(export))]
27831pub struct SETUP_SIGNING_DATA {
27832    #[doc = "initial timestamp"]
27833    pub initial_timestamp: u64,
27834    #[doc = "system id of the target"]
27835    pub target_system: u8,
27836    #[doc = "component ID of the target"]
27837    pub target_component: u8,
27838    #[doc = "signing key"]
27839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27841    pub secret_key: [u8; 32],
27842}
27843impl SETUP_SIGNING_DATA {
27844    pub const ENCODED_LEN: usize = 42usize;
27845    pub const DEFAULT: Self = Self {
27846        initial_timestamp: 0_u64,
27847        target_system: 0_u8,
27848        target_component: 0_u8,
27849        secret_key: [0_u8; 32usize],
27850    };
27851    #[cfg(feature = "arbitrary")]
27852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27853        use arbitrary::{Arbitrary, Unstructured};
27854        let mut buf = [0u8; 1024];
27855        rng.fill_bytes(&mut buf);
27856        let mut unstructured = Unstructured::new(&buf);
27857        Self::arbitrary(&mut unstructured).unwrap_or_default()
27858    }
27859}
27860impl Default for SETUP_SIGNING_DATA {
27861    fn default() -> Self {
27862        Self::DEFAULT.clone()
27863    }
27864}
27865impl MessageData for SETUP_SIGNING_DATA {
27866    type Message = MavMessage;
27867    const ID: u32 = 256u32;
27868    const NAME: &'static str = "SETUP_SIGNING";
27869    const EXTRA_CRC: u8 = 71u8;
27870    const ENCODED_LEN: usize = 42usize;
27871    fn deser(
27872        _version: MavlinkVersion,
27873        __input: &[u8],
27874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27875        let avail_len = __input.len();
27876        let mut payload_buf = [0; Self::ENCODED_LEN];
27877        let mut buf = if avail_len < Self::ENCODED_LEN {
27878            payload_buf[0..avail_len].copy_from_slice(__input);
27879            Bytes::new(&payload_buf)
27880        } else {
27881            Bytes::new(__input)
27882        };
27883        let mut __struct = Self::default();
27884        __struct.initial_timestamp = buf.get_u64_le()?;
27885        __struct.target_system = buf.get_u8()?;
27886        __struct.target_component = buf.get_u8()?;
27887        for v in &mut __struct.secret_key {
27888            let val = buf.get_u8()?;
27889            *v = val;
27890        }
27891        Ok(__struct)
27892    }
27893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27894        let mut __tmp = BytesMut::new(bytes);
27895        #[allow(clippy::absurd_extreme_comparisons)]
27896        #[allow(unused_comparisons)]
27897        if __tmp.remaining() < Self::ENCODED_LEN {
27898            panic!(
27899                "buffer is too small (need {} bytes, but got {})",
27900                Self::ENCODED_LEN,
27901                __tmp.remaining(),
27902            )
27903        }
27904        __tmp.put_u64_le(self.initial_timestamp);
27905        __tmp.put_u8(self.target_system);
27906        __tmp.put_u8(self.target_component);
27907        for val in &self.secret_key {
27908            __tmp.put_u8(*val);
27909        }
27910        if matches!(version, MavlinkVersion::V2) {
27911            let len = __tmp.len();
27912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27913        } else {
27914            __tmp.len()
27915        }
27916    }
27917}
27918#[doc = "Set the vehicle attitude and body angular rates."]
27919#[doc = ""]
27920#[doc = "ID: 139"]
27921#[derive(Debug, Clone, PartialEq)]
27922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27924#[cfg_attr(feature = "ts", derive(TS))]
27925#[cfg_attr(feature = "ts", ts(export))]
27926pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27927    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27928    pub time_usec: u64,
27929    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27930    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27931    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27932    pub controls: [f32; 8],
27933    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27934    pub group_mlx: u8,
27935    #[doc = "System ID"]
27936    pub target_system: u8,
27937    #[doc = "Component ID"]
27938    pub target_component: u8,
27939}
27940impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27941    pub const ENCODED_LEN: usize = 43usize;
27942    pub const DEFAULT: Self = Self {
27943        time_usec: 0_u64,
27944        controls: [0.0_f32; 8usize],
27945        group_mlx: 0_u8,
27946        target_system: 0_u8,
27947        target_component: 0_u8,
27948    };
27949    #[cfg(feature = "arbitrary")]
27950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27951        use arbitrary::{Arbitrary, Unstructured};
27952        let mut buf = [0u8; 1024];
27953        rng.fill_bytes(&mut buf);
27954        let mut unstructured = Unstructured::new(&buf);
27955        Self::arbitrary(&mut unstructured).unwrap_or_default()
27956    }
27957}
27958impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27959    fn default() -> Self {
27960        Self::DEFAULT.clone()
27961    }
27962}
27963impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27964    type Message = MavMessage;
27965    const ID: u32 = 139u32;
27966    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27967    const EXTRA_CRC: u8 = 168u8;
27968    const ENCODED_LEN: usize = 43usize;
27969    fn deser(
27970        _version: MavlinkVersion,
27971        __input: &[u8],
27972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27973        let avail_len = __input.len();
27974        let mut payload_buf = [0; Self::ENCODED_LEN];
27975        let mut buf = if avail_len < Self::ENCODED_LEN {
27976            payload_buf[0..avail_len].copy_from_slice(__input);
27977            Bytes::new(&payload_buf)
27978        } else {
27979            Bytes::new(__input)
27980        };
27981        let mut __struct = Self::default();
27982        __struct.time_usec = buf.get_u64_le()?;
27983        for v in &mut __struct.controls {
27984            let val = buf.get_f32_le()?;
27985            *v = val;
27986        }
27987        __struct.group_mlx = buf.get_u8()?;
27988        __struct.target_system = buf.get_u8()?;
27989        __struct.target_component = buf.get_u8()?;
27990        Ok(__struct)
27991    }
27992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27993        let mut __tmp = BytesMut::new(bytes);
27994        #[allow(clippy::absurd_extreme_comparisons)]
27995        #[allow(unused_comparisons)]
27996        if __tmp.remaining() < Self::ENCODED_LEN {
27997            panic!(
27998                "buffer is too small (need {} bytes, but got {})",
27999                Self::ENCODED_LEN,
28000                __tmp.remaining(),
28001            )
28002        }
28003        __tmp.put_u64_le(self.time_usec);
28004        for val in &self.controls {
28005            __tmp.put_f32_le(*val);
28006        }
28007        __tmp.put_u8(self.group_mlx);
28008        __tmp.put_u8(self.target_system);
28009        __tmp.put_u8(self.target_component);
28010        if matches!(version, MavlinkVersion::V2) {
28011            let len = __tmp.len();
28012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28013        } else {
28014            __tmp.len()
28015        }
28016    }
28017}
28018#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28019#[doc = ""]
28020#[doc = "ID: 82"]
28021#[derive(Debug, Clone, PartialEq)]
28022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28024#[cfg_attr(feature = "ts", derive(TS))]
28025#[cfg_attr(feature = "ts", ts(export))]
28026pub struct SET_ATTITUDE_TARGET_DATA {
28027    #[doc = "Timestamp (time since system boot)."]
28028    pub time_boot_ms: u32,
28029    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28031    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28032    pub q: [f32; 4],
28033    #[doc = "Body roll rate"]
28034    pub body_roll_rate: f32,
28035    #[doc = "Body pitch rate"]
28036    pub body_pitch_rate: f32,
28037    #[doc = "Body yaw rate"]
28038    pub body_yaw_rate: f32,
28039    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28040    pub thrust: f32,
28041    #[doc = "System ID"]
28042    pub target_system: u8,
28043    #[doc = "Component ID"]
28044    pub target_component: u8,
28045    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28046    pub type_mask: AttitudeTargetTypemask,
28047    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28048    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28049    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28050    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28051    pub thrust_body: [f32; 3],
28052}
28053impl SET_ATTITUDE_TARGET_DATA {
28054    pub const ENCODED_LEN: usize = 51usize;
28055    pub const DEFAULT: Self = Self {
28056        time_boot_ms: 0_u32,
28057        q: [0.0_f32; 4usize],
28058        body_roll_rate: 0.0_f32,
28059        body_pitch_rate: 0.0_f32,
28060        body_yaw_rate: 0.0_f32,
28061        thrust: 0.0_f32,
28062        target_system: 0_u8,
28063        target_component: 0_u8,
28064        type_mask: AttitudeTargetTypemask::DEFAULT,
28065        thrust_body: [0.0_f32; 3usize],
28066    };
28067    #[cfg(feature = "arbitrary")]
28068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28069        use arbitrary::{Arbitrary, Unstructured};
28070        let mut buf = [0u8; 1024];
28071        rng.fill_bytes(&mut buf);
28072        let mut unstructured = Unstructured::new(&buf);
28073        Self::arbitrary(&mut unstructured).unwrap_or_default()
28074    }
28075}
28076impl Default for SET_ATTITUDE_TARGET_DATA {
28077    fn default() -> Self {
28078        Self::DEFAULT.clone()
28079    }
28080}
28081impl MessageData for SET_ATTITUDE_TARGET_DATA {
28082    type Message = MavMessage;
28083    const ID: u32 = 82u32;
28084    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28085    const EXTRA_CRC: u8 = 49u8;
28086    const ENCODED_LEN: usize = 51usize;
28087    fn deser(
28088        _version: MavlinkVersion,
28089        __input: &[u8],
28090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28091        let avail_len = __input.len();
28092        let mut payload_buf = [0; Self::ENCODED_LEN];
28093        let mut buf = if avail_len < Self::ENCODED_LEN {
28094            payload_buf[0..avail_len].copy_from_slice(__input);
28095            Bytes::new(&payload_buf)
28096        } else {
28097            Bytes::new(__input)
28098        };
28099        let mut __struct = Self::default();
28100        __struct.time_boot_ms = buf.get_u32_le()?;
28101        for v in &mut __struct.q {
28102            let val = buf.get_f32_le()?;
28103            *v = val;
28104        }
28105        __struct.body_roll_rate = buf.get_f32_le()?;
28106        __struct.body_pitch_rate = buf.get_f32_le()?;
28107        __struct.body_yaw_rate = buf.get_f32_le()?;
28108        __struct.thrust = buf.get_f32_le()?;
28109        __struct.target_system = buf.get_u8()?;
28110        __struct.target_component = buf.get_u8()?;
28111        let tmp = buf.get_u8()?;
28112        __struct.type_mask =
28113            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
28114                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28115                    flag_type: "AttitudeTargetTypemask",
28116                    value: tmp as u64,
28117                })?;
28118        for v in &mut __struct.thrust_body {
28119            let val = buf.get_f32_le()?;
28120            *v = val;
28121        }
28122        Ok(__struct)
28123    }
28124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28125        let mut __tmp = BytesMut::new(bytes);
28126        #[allow(clippy::absurd_extreme_comparisons)]
28127        #[allow(unused_comparisons)]
28128        if __tmp.remaining() < Self::ENCODED_LEN {
28129            panic!(
28130                "buffer is too small (need {} bytes, but got {})",
28131                Self::ENCODED_LEN,
28132                __tmp.remaining(),
28133            )
28134        }
28135        __tmp.put_u32_le(self.time_boot_ms);
28136        for val in &self.q {
28137            __tmp.put_f32_le(*val);
28138        }
28139        __tmp.put_f32_le(self.body_roll_rate);
28140        __tmp.put_f32_le(self.body_pitch_rate);
28141        __tmp.put_f32_le(self.body_yaw_rate);
28142        __tmp.put_f32_le(self.thrust);
28143        __tmp.put_u8(self.target_system);
28144        __tmp.put_u8(self.target_component);
28145        __tmp.put_u8(self.type_mask.bits() as u8);
28146        if matches!(version, MavlinkVersion::V2) {
28147            for val in &self.thrust_body {
28148                __tmp.put_f32_le(*val);
28149            }
28150            let len = __tmp.len();
28151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28152        } else {
28153            __tmp.len()
28154        }
28155    }
28156}
28157#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28158#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28159#[doc = ""]
28160#[doc = "ID: 48"]
28161#[derive(Debug, Clone, PartialEq)]
28162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28164#[cfg_attr(feature = "ts", derive(TS))]
28165#[cfg_attr(feature = "ts", ts(export))]
28166pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28167    #[doc = "Latitude (WGS84)"]
28168    pub latitude: i32,
28169    #[doc = "Longitude (WGS84)"]
28170    pub longitude: i32,
28171    #[doc = "Altitude (MSL). Positive for up."]
28172    pub altitude: i32,
28173    #[doc = "System ID"]
28174    pub target_system: u8,
28175    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28177    pub time_usec: u64,
28178}
28179impl SET_GPS_GLOBAL_ORIGIN_DATA {
28180    pub const ENCODED_LEN: usize = 21usize;
28181    pub const DEFAULT: Self = Self {
28182        latitude: 0_i32,
28183        longitude: 0_i32,
28184        altitude: 0_i32,
28185        target_system: 0_u8,
28186        time_usec: 0_u64,
28187    };
28188    #[cfg(feature = "arbitrary")]
28189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28190        use arbitrary::{Arbitrary, Unstructured};
28191        let mut buf = [0u8; 1024];
28192        rng.fill_bytes(&mut buf);
28193        let mut unstructured = Unstructured::new(&buf);
28194        Self::arbitrary(&mut unstructured).unwrap_or_default()
28195    }
28196}
28197impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28198    fn default() -> Self {
28199        Self::DEFAULT.clone()
28200    }
28201}
28202impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28203    type Message = MavMessage;
28204    const ID: u32 = 48u32;
28205    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28206    const EXTRA_CRC: u8 = 41u8;
28207    const ENCODED_LEN: usize = 21usize;
28208    fn deser(
28209        _version: MavlinkVersion,
28210        __input: &[u8],
28211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28212        let avail_len = __input.len();
28213        let mut payload_buf = [0; Self::ENCODED_LEN];
28214        let mut buf = if avail_len < Self::ENCODED_LEN {
28215            payload_buf[0..avail_len].copy_from_slice(__input);
28216            Bytes::new(&payload_buf)
28217        } else {
28218            Bytes::new(__input)
28219        };
28220        let mut __struct = Self::default();
28221        __struct.latitude = buf.get_i32_le()?;
28222        __struct.longitude = buf.get_i32_le()?;
28223        __struct.altitude = buf.get_i32_le()?;
28224        __struct.target_system = buf.get_u8()?;
28225        __struct.time_usec = buf.get_u64_le()?;
28226        Ok(__struct)
28227    }
28228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28229        let mut __tmp = BytesMut::new(bytes);
28230        #[allow(clippy::absurd_extreme_comparisons)]
28231        #[allow(unused_comparisons)]
28232        if __tmp.remaining() < Self::ENCODED_LEN {
28233            panic!(
28234                "buffer is too small (need {} bytes, but got {})",
28235                Self::ENCODED_LEN,
28236                __tmp.remaining(),
28237            )
28238        }
28239        __tmp.put_i32_le(self.latitude);
28240        __tmp.put_i32_le(self.longitude);
28241        __tmp.put_i32_le(self.altitude);
28242        __tmp.put_u8(self.target_system);
28243        if matches!(version, MavlinkVersion::V2) {
28244            __tmp.put_u64_le(self.time_usec);
28245            let len = __tmp.len();
28246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28247        } else {
28248            __tmp.len()
28249        }
28250    }
28251}
28252#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28253#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28254#[doc = ""]
28255#[doc = "ID: 243"]
28256#[derive(Debug, Clone, PartialEq)]
28257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28259#[cfg_attr(feature = "ts", derive(TS))]
28260#[cfg_attr(feature = "ts", ts(export))]
28261pub struct SET_HOME_POSITION_DATA {
28262    #[doc = "Latitude (WGS84)"]
28263    pub latitude: i32,
28264    #[doc = "Longitude (WGS84)"]
28265    pub longitude: i32,
28266    #[doc = "Altitude (MSL). Positive for up."]
28267    pub altitude: i32,
28268    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28269    pub x: f32,
28270    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28271    pub y: f32,
28272    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28273    pub z: f32,
28274    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28276    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28277    pub q: [f32; 4],
28278    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28279    pub approach_x: f32,
28280    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28281    pub approach_y: f32,
28282    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28283    pub approach_z: f32,
28284    #[doc = "System ID."]
28285    pub target_system: u8,
28286    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28287    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28288    pub time_usec: u64,
28289}
28290impl SET_HOME_POSITION_DATA {
28291    pub const ENCODED_LEN: usize = 61usize;
28292    pub const DEFAULT: Self = Self {
28293        latitude: 0_i32,
28294        longitude: 0_i32,
28295        altitude: 0_i32,
28296        x: 0.0_f32,
28297        y: 0.0_f32,
28298        z: 0.0_f32,
28299        q: [0.0_f32; 4usize],
28300        approach_x: 0.0_f32,
28301        approach_y: 0.0_f32,
28302        approach_z: 0.0_f32,
28303        target_system: 0_u8,
28304        time_usec: 0_u64,
28305    };
28306    #[cfg(feature = "arbitrary")]
28307    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28308        use arbitrary::{Arbitrary, Unstructured};
28309        let mut buf = [0u8; 1024];
28310        rng.fill_bytes(&mut buf);
28311        let mut unstructured = Unstructured::new(&buf);
28312        Self::arbitrary(&mut unstructured).unwrap_or_default()
28313    }
28314}
28315impl Default for SET_HOME_POSITION_DATA {
28316    fn default() -> Self {
28317        Self::DEFAULT.clone()
28318    }
28319}
28320impl MessageData for SET_HOME_POSITION_DATA {
28321    type Message = MavMessage;
28322    const ID: u32 = 243u32;
28323    const NAME: &'static str = "SET_HOME_POSITION";
28324    const EXTRA_CRC: u8 = 85u8;
28325    const ENCODED_LEN: usize = 61usize;
28326    fn deser(
28327        _version: MavlinkVersion,
28328        __input: &[u8],
28329    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28330        let avail_len = __input.len();
28331        let mut payload_buf = [0; Self::ENCODED_LEN];
28332        let mut buf = if avail_len < Self::ENCODED_LEN {
28333            payload_buf[0..avail_len].copy_from_slice(__input);
28334            Bytes::new(&payload_buf)
28335        } else {
28336            Bytes::new(__input)
28337        };
28338        let mut __struct = Self::default();
28339        __struct.latitude = buf.get_i32_le()?;
28340        __struct.longitude = buf.get_i32_le()?;
28341        __struct.altitude = buf.get_i32_le()?;
28342        __struct.x = buf.get_f32_le()?;
28343        __struct.y = buf.get_f32_le()?;
28344        __struct.z = buf.get_f32_le()?;
28345        for v in &mut __struct.q {
28346            let val = buf.get_f32_le()?;
28347            *v = val;
28348        }
28349        __struct.approach_x = buf.get_f32_le()?;
28350        __struct.approach_y = buf.get_f32_le()?;
28351        __struct.approach_z = buf.get_f32_le()?;
28352        __struct.target_system = buf.get_u8()?;
28353        __struct.time_usec = buf.get_u64_le()?;
28354        Ok(__struct)
28355    }
28356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28357        let mut __tmp = BytesMut::new(bytes);
28358        #[allow(clippy::absurd_extreme_comparisons)]
28359        #[allow(unused_comparisons)]
28360        if __tmp.remaining() < Self::ENCODED_LEN {
28361            panic!(
28362                "buffer is too small (need {} bytes, but got {})",
28363                Self::ENCODED_LEN,
28364                __tmp.remaining(),
28365            )
28366        }
28367        __tmp.put_i32_le(self.latitude);
28368        __tmp.put_i32_le(self.longitude);
28369        __tmp.put_i32_le(self.altitude);
28370        __tmp.put_f32_le(self.x);
28371        __tmp.put_f32_le(self.y);
28372        __tmp.put_f32_le(self.z);
28373        for val in &self.q {
28374            __tmp.put_f32_le(*val);
28375        }
28376        __tmp.put_f32_le(self.approach_x);
28377        __tmp.put_f32_le(self.approach_y);
28378        __tmp.put_f32_le(self.approach_z);
28379        __tmp.put_u8(self.target_system);
28380        if matches!(version, MavlinkVersion::V2) {
28381            __tmp.put_u64_le(self.time_usec);
28382            let len = __tmp.len();
28383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28384        } else {
28385            __tmp.len()
28386        }
28387    }
28388}
28389#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28390#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28391#[doc = ""]
28392#[doc = "ID: 11"]
28393#[derive(Debug, Clone, PartialEq)]
28394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28396#[cfg_attr(feature = "ts", derive(TS))]
28397#[cfg_attr(feature = "ts", ts(export))]
28398pub struct SET_MODE_DATA {
28399    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28400    pub custom_mode: u32,
28401    #[doc = "The system setting the mode"]
28402    pub target_system: u8,
28403    #[doc = "The new base mode."]
28404    pub base_mode: MavMode,
28405}
28406impl SET_MODE_DATA {
28407    pub const ENCODED_LEN: usize = 6usize;
28408    pub const DEFAULT: Self = Self {
28409        custom_mode: 0_u32,
28410        target_system: 0_u8,
28411        base_mode: MavMode::DEFAULT,
28412    };
28413    #[cfg(feature = "arbitrary")]
28414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28415        use arbitrary::{Arbitrary, Unstructured};
28416        let mut buf = [0u8; 1024];
28417        rng.fill_bytes(&mut buf);
28418        let mut unstructured = Unstructured::new(&buf);
28419        Self::arbitrary(&mut unstructured).unwrap_or_default()
28420    }
28421}
28422impl Default for SET_MODE_DATA {
28423    fn default() -> Self {
28424        Self::DEFAULT.clone()
28425    }
28426}
28427impl MessageData for SET_MODE_DATA {
28428    type Message = MavMessage;
28429    const ID: u32 = 11u32;
28430    const NAME: &'static str = "SET_MODE";
28431    const EXTRA_CRC: u8 = 89u8;
28432    const ENCODED_LEN: usize = 6usize;
28433    fn deser(
28434        _version: MavlinkVersion,
28435        __input: &[u8],
28436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28437        let avail_len = __input.len();
28438        let mut payload_buf = [0; Self::ENCODED_LEN];
28439        let mut buf = if avail_len < Self::ENCODED_LEN {
28440            payload_buf[0..avail_len].copy_from_slice(__input);
28441            Bytes::new(&payload_buf)
28442        } else {
28443            Bytes::new(__input)
28444        };
28445        let mut __struct = Self::default();
28446        __struct.custom_mode = buf.get_u32_le()?;
28447        __struct.target_system = buf.get_u8()?;
28448        let tmp = buf.get_u8()?;
28449        __struct.base_mode =
28450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28451                enum_type: "MavMode",
28452                value: tmp as u64,
28453            })?;
28454        Ok(__struct)
28455    }
28456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28457        let mut __tmp = BytesMut::new(bytes);
28458        #[allow(clippy::absurd_extreme_comparisons)]
28459        #[allow(unused_comparisons)]
28460        if __tmp.remaining() < Self::ENCODED_LEN {
28461            panic!(
28462                "buffer is too small (need {} bytes, but got {})",
28463                Self::ENCODED_LEN,
28464                __tmp.remaining(),
28465            )
28466        }
28467        __tmp.put_u32_le(self.custom_mode);
28468        __tmp.put_u8(self.target_system);
28469        __tmp.put_u8(self.base_mode as u8);
28470        if matches!(version, MavlinkVersion::V2) {
28471            let len = __tmp.len();
28472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28473        } else {
28474            __tmp.len()
28475        }
28476    }
28477}
28478#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28479#[doc = ""]
28480#[doc = "ID: 86"]
28481#[derive(Debug, Clone, PartialEq)]
28482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28484#[cfg_attr(feature = "ts", derive(TS))]
28485#[cfg_attr(feature = "ts", ts(export))]
28486pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28487    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28488    pub time_boot_ms: u32,
28489    #[doc = "Latitude in WGS84 frame"]
28490    pub lat_int: i32,
28491    #[doc = "Longitude in WGS84 frame"]
28492    pub lon_int: i32,
28493    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28494    pub alt: f32,
28495    #[doc = "X velocity in NED frame"]
28496    pub vx: f32,
28497    #[doc = "Y velocity in NED frame"]
28498    pub vy: f32,
28499    #[doc = "Z velocity in NED frame"]
28500    pub vz: f32,
28501    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28502    pub afx: f32,
28503    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28504    pub afy: f32,
28505    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28506    pub afz: f32,
28507    #[doc = "yaw setpoint"]
28508    pub yaw: f32,
28509    #[doc = "yaw rate setpoint"]
28510    pub yaw_rate: f32,
28511    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28512    pub type_mask: PositionTargetTypemask,
28513    #[doc = "System ID"]
28514    pub target_system: u8,
28515    #[doc = "Component ID"]
28516    pub target_component: u8,
28517    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28518    pub coordinate_frame: MavFrame,
28519}
28520impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28521    pub const ENCODED_LEN: usize = 53usize;
28522    pub const DEFAULT: Self = Self {
28523        time_boot_ms: 0_u32,
28524        lat_int: 0_i32,
28525        lon_int: 0_i32,
28526        alt: 0.0_f32,
28527        vx: 0.0_f32,
28528        vy: 0.0_f32,
28529        vz: 0.0_f32,
28530        afx: 0.0_f32,
28531        afy: 0.0_f32,
28532        afz: 0.0_f32,
28533        yaw: 0.0_f32,
28534        yaw_rate: 0.0_f32,
28535        type_mask: PositionTargetTypemask::DEFAULT,
28536        target_system: 0_u8,
28537        target_component: 0_u8,
28538        coordinate_frame: MavFrame::DEFAULT,
28539    };
28540    #[cfg(feature = "arbitrary")]
28541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28542        use arbitrary::{Arbitrary, Unstructured};
28543        let mut buf = [0u8; 1024];
28544        rng.fill_bytes(&mut buf);
28545        let mut unstructured = Unstructured::new(&buf);
28546        Self::arbitrary(&mut unstructured).unwrap_or_default()
28547    }
28548}
28549impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28550    fn default() -> Self {
28551        Self::DEFAULT.clone()
28552    }
28553}
28554impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28555    type Message = MavMessage;
28556    const ID: u32 = 86u32;
28557    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28558    const EXTRA_CRC: u8 = 5u8;
28559    const ENCODED_LEN: usize = 53usize;
28560    fn deser(
28561        _version: MavlinkVersion,
28562        __input: &[u8],
28563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28564        let avail_len = __input.len();
28565        let mut payload_buf = [0; Self::ENCODED_LEN];
28566        let mut buf = if avail_len < Self::ENCODED_LEN {
28567            payload_buf[0..avail_len].copy_from_slice(__input);
28568            Bytes::new(&payload_buf)
28569        } else {
28570            Bytes::new(__input)
28571        };
28572        let mut __struct = Self::default();
28573        __struct.time_boot_ms = buf.get_u32_le()?;
28574        __struct.lat_int = buf.get_i32_le()?;
28575        __struct.lon_int = buf.get_i32_le()?;
28576        __struct.alt = buf.get_f32_le()?;
28577        __struct.vx = buf.get_f32_le()?;
28578        __struct.vy = buf.get_f32_le()?;
28579        __struct.vz = buf.get_f32_le()?;
28580        __struct.afx = buf.get_f32_le()?;
28581        __struct.afy = buf.get_f32_le()?;
28582        __struct.afz = buf.get_f32_le()?;
28583        __struct.yaw = buf.get_f32_le()?;
28584        __struct.yaw_rate = buf.get_f32_le()?;
28585        let tmp = buf.get_u16_le()?;
28586        __struct.type_mask =
28587            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28588                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28589                    flag_type: "PositionTargetTypemask",
28590                    value: tmp as u64,
28591                })?;
28592        __struct.target_system = buf.get_u8()?;
28593        __struct.target_component = buf.get_u8()?;
28594        let tmp = buf.get_u8()?;
28595        __struct.coordinate_frame =
28596            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28597                enum_type: "MavFrame",
28598                value: tmp as u64,
28599            })?;
28600        Ok(__struct)
28601    }
28602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28603        let mut __tmp = BytesMut::new(bytes);
28604        #[allow(clippy::absurd_extreme_comparisons)]
28605        #[allow(unused_comparisons)]
28606        if __tmp.remaining() < Self::ENCODED_LEN {
28607            panic!(
28608                "buffer is too small (need {} bytes, but got {})",
28609                Self::ENCODED_LEN,
28610                __tmp.remaining(),
28611            )
28612        }
28613        __tmp.put_u32_le(self.time_boot_ms);
28614        __tmp.put_i32_le(self.lat_int);
28615        __tmp.put_i32_le(self.lon_int);
28616        __tmp.put_f32_le(self.alt);
28617        __tmp.put_f32_le(self.vx);
28618        __tmp.put_f32_le(self.vy);
28619        __tmp.put_f32_le(self.vz);
28620        __tmp.put_f32_le(self.afx);
28621        __tmp.put_f32_le(self.afy);
28622        __tmp.put_f32_le(self.afz);
28623        __tmp.put_f32_le(self.yaw);
28624        __tmp.put_f32_le(self.yaw_rate);
28625        __tmp.put_u16_le(self.type_mask.bits() as u16);
28626        __tmp.put_u8(self.target_system);
28627        __tmp.put_u8(self.target_component);
28628        __tmp.put_u8(self.coordinate_frame as u8);
28629        if matches!(version, MavlinkVersion::V2) {
28630            let len = __tmp.len();
28631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28632        } else {
28633            __tmp.len()
28634        }
28635    }
28636}
28637#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28638#[doc = ""]
28639#[doc = "ID: 84"]
28640#[derive(Debug, Clone, PartialEq)]
28641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28643#[cfg_attr(feature = "ts", derive(TS))]
28644#[cfg_attr(feature = "ts", ts(export))]
28645pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28646    #[doc = "Timestamp (time since system boot)."]
28647    pub time_boot_ms: u32,
28648    #[doc = "X Position in NED frame"]
28649    pub x: f32,
28650    #[doc = "Y Position in NED frame"]
28651    pub y: f32,
28652    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28653    pub z: f32,
28654    #[doc = "X velocity in NED frame"]
28655    pub vx: f32,
28656    #[doc = "Y velocity in NED frame"]
28657    pub vy: f32,
28658    #[doc = "Z velocity in NED frame"]
28659    pub vz: f32,
28660    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28661    pub afx: f32,
28662    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28663    pub afy: f32,
28664    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28665    pub afz: f32,
28666    #[doc = "yaw setpoint"]
28667    pub yaw: f32,
28668    #[doc = "yaw rate setpoint"]
28669    pub yaw_rate: f32,
28670    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28671    pub type_mask: PositionTargetTypemask,
28672    #[doc = "System ID"]
28673    pub target_system: u8,
28674    #[doc = "Component ID"]
28675    pub target_component: u8,
28676    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28677    pub coordinate_frame: MavFrame,
28678}
28679impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28680    pub const ENCODED_LEN: usize = 53usize;
28681    pub const DEFAULT: Self = Self {
28682        time_boot_ms: 0_u32,
28683        x: 0.0_f32,
28684        y: 0.0_f32,
28685        z: 0.0_f32,
28686        vx: 0.0_f32,
28687        vy: 0.0_f32,
28688        vz: 0.0_f32,
28689        afx: 0.0_f32,
28690        afy: 0.0_f32,
28691        afz: 0.0_f32,
28692        yaw: 0.0_f32,
28693        yaw_rate: 0.0_f32,
28694        type_mask: PositionTargetTypemask::DEFAULT,
28695        target_system: 0_u8,
28696        target_component: 0_u8,
28697        coordinate_frame: MavFrame::DEFAULT,
28698    };
28699    #[cfg(feature = "arbitrary")]
28700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28701        use arbitrary::{Arbitrary, Unstructured};
28702        let mut buf = [0u8; 1024];
28703        rng.fill_bytes(&mut buf);
28704        let mut unstructured = Unstructured::new(&buf);
28705        Self::arbitrary(&mut unstructured).unwrap_or_default()
28706    }
28707}
28708impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28709    fn default() -> Self {
28710        Self::DEFAULT.clone()
28711    }
28712}
28713impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28714    type Message = MavMessage;
28715    const ID: u32 = 84u32;
28716    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28717    const EXTRA_CRC: u8 = 143u8;
28718    const ENCODED_LEN: usize = 53usize;
28719    fn deser(
28720        _version: MavlinkVersion,
28721        __input: &[u8],
28722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28723        let avail_len = __input.len();
28724        let mut payload_buf = [0; Self::ENCODED_LEN];
28725        let mut buf = if avail_len < Self::ENCODED_LEN {
28726            payload_buf[0..avail_len].copy_from_slice(__input);
28727            Bytes::new(&payload_buf)
28728        } else {
28729            Bytes::new(__input)
28730        };
28731        let mut __struct = Self::default();
28732        __struct.time_boot_ms = buf.get_u32_le()?;
28733        __struct.x = buf.get_f32_le()?;
28734        __struct.y = buf.get_f32_le()?;
28735        __struct.z = buf.get_f32_le()?;
28736        __struct.vx = buf.get_f32_le()?;
28737        __struct.vy = buf.get_f32_le()?;
28738        __struct.vz = buf.get_f32_le()?;
28739        __struct.afx = buf.get_f32_le()?;
28740        __struct.afy = buf.get_f32_le()?;
28741        __struct.afz = buf.get_f32_le()?;
28742        __struct.yaw = buf.get_f32_le()?;
28743        __struct.yaw_rate = buf.get_f32_le()?;
28744        let tmp = buf.get_u16_le()?;
28745        __struct.type_mask =
28746            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28747                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28748                    flag_type: "PositionTargetTypemask",
28749                    value: tmp as u64,
28750                })?;
28751        __struct.target_system = buf.get_u8()?;
28752        __struct.target_component = buf.get_u8()?;
28753        let tmp = buf.get_u8()?;
28754        __struct.coordinate_frame =
28755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28756                enum_type: "MavFrame",
28757                value: tmp as u64,
28758            })?;
28759        Ok(__struct)
28760    }
28761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28762        let mut __tmp = BytesMut::new(bytes);
28763        #[allow(clippy::absurd_extreme_comparisons)]
28764        #[allow(unused_comparisons)]
28765        if __tmp.remaining() < Self::ENCODED_LEN {
28766            panic!(
28767                "buffer is too small (need {} bytes, but got {})",
28768                Self::ENCODED_LEN,
28769                __tmp.remaining(),
28770            )
28771        }
28772        __tmp.put_u32_le(self.time_boot_ms);
28773        __tmp.put_f32_le(self.x);
28774        __tmp.put_f32_le(self.y);
28775        __tmp.put_f32_le(self.z);
28776        __tmp.put_f32_le(self.vx);
28777        __tmp.put_f32_le(self.vy);
28778        __tmp.put_f32_le(self.vz);
28779        __tmp.put_f32_le(self.afx);
28780        __tmp.put_f32_le(self.afy);
28781        __tmp.put_f32_le(self.afz);
28782        __tmp.put_f32_le(self.yaw);
28783        __tmp.put_f32_le(self.yaw_rate);
28784        __tmp.put_u16_le(self.type_mask.bits() as u16);
28785        __tmp.put_u8(self.target_system);
28786        __tmp.put_u8(self.target_component);
28787        __tmp.put_u8(self.coordinate_frame as u8);
28788        if matches!(version, MavlinkVersion::V2) {
28789            let len = __tmp.len();
28790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28791        } else {
28792            __tmp.len()
28793        }
28794    }
28795}
28796#[doc = "Status of simulation environment, if used."]
28797#[doc = ""]
28798#[doc = "ID: 108"]
28799#[derive(Debug, Clone, PartialEq)]
28800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28802#[cfg_attr(feature = "ts", derive(TS))]
28803#[cfg_attr(feature = "ts", ts(export))]
28804pub struct SIM_STATE_DATA {
28805    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28806    pub q1: f32,
28807    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28808    pub q2: f32,
28809    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28810    pub q3: f32,
28811    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28812    pub q4: f32,
28813    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28814    pub roll: f32,
28815    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28816    pub pitch: f32,
28817    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28818    pub yaw: f32,
28819    #[doc = "X acceleration"]
28820    pub xacc: f32,
28821    #[doc = "Y acceleration"]
28822    pub yacc: f32,
28823    #[doc = "Z acceleration"]
28824    pub zacc: f32,
28825    #[doc = "Angular speed around X axis"]
28826    pub xgyro: f32,
28827    #[doc = "Angular speed around Y axis"]
28828    pub ygyro: f32,
28829    #[doc = "Angular speed around Z axis"]
28830    pub zgyro: f32,
28831    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28832    pub lat: f32,
28833    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28834    pub lon: f32,
28835    #[doc = "Altitude"]
28836    pub alt: f32,
28837    #[doc = "Horizontal position standard deviation"]
28838    pub std_dev_horz: f32,
28839    #[doc = "Vertical position standard deviation"]
28840    pub std_dev_vert: f32,
28841    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28842    pub vn: f32,
28843    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28844    pub ve: f32,
28845    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28846    pub vd: f32,
28847    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28848    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28849    pub lat_int: i32,
28850    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28851    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28852    pub lon_int: i32,
28853}
28854impl SIM_STATE_DATA {
28855    pub const ENCODED_LEN: usize = 92usize;
28856    pub const DEFAULT: Self = Self {
28857        q1: 0.0_f32,
28858        q2: 0.0_f32,
28859        q3: 0.0_f32,
28860        q4: 0.0_f32,
28861        roll: 0.0_f32,
28862        pitch: 0.0_f32,
28863        yaw: 0.0_f32,
28864        xacc: 0.0_f32,
28865        yacc: 0.0_f32,
28866        zacc: 0.0_f32,
28867        xgyro: 0.0_f32,
28868        ygyro: 0.0_f32,
28869        zgyro: 0.0_f32,
28870        lat: 0.0_f32,
28871        lon: 0.0_f32,
28872        alt: 0.0_f32,
28873        std_dev_horz: 0.0_f32,
28874        std_dev_vert: 0.0_f32,
28875        vn: 0.0_f32,
28876        ve: 0.0_f32,
28877        vd: 0.0_f32,
28878        lat_int: 0_i32,
28879        lon_int: 0_i32,
28880    };
28881    #[cfg(feature = "arbitrary")]
28882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28883        use arbitrary::{Arbitrary, Unstructured};
28884        let mut buf = [0u8; 1024];
28885        rng.fill_bytes(&mut buf);
28886        let mut unstructured = Unstructured::new(&buf);
28887        Self::arbitrary(&mut unstructured).unwrap_or_default()
28888    }
28889}
28890impl Default for SIM_STATE_DATA {
28891    fn default() -> Self {
28892        Self::DEFAULT.clone()
28893    }
28894}
28895impl MessageData for SIM_STATE_DATA {
28896    type Message = MavMessage;
28897    const ID: u32 = 108u32;
28898    const NAME: &'static str = "SIM_STATE";
28899    const EXTRA_CRC: u8 = 32u8;
28900    const ENCODED_LEN: usize = 92usize;
28901    fn deser(
28902        _version: MavlinkVersion,
28903        __input: &[u8],
28904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28905        let avail_len = __input.len();
28906        let mut payload_buf = [0; Self::ENCODED_LEN];
28907        let mut buf = if avail_len < Self::ENCODED_LEN {
28908            payload_buf[0..avail_len].copy_from_slice(__input);
28909            Bytes::new(&payload_buf)
28910        } else {
28911            Bytes::new(__input)
28912        };
28913        let mut __struct = Self::default();
28914        __struct.q1 = buf.get_f32_le()?;
28915        __struct.q2 = buf.get_f32_le()?;
28916        __struct.q3 = buf.get_f32_le()?;
28917        __struct.q4 = buf.get_f32_le()?;
28918        __struct.roll = buf.get_f32_le()?;
28919        __struct.pitch = buf.get_f32_le()?;
28920        __struct.yaw = buf.get_f32_le()?;
28921        __struct.xacc = buf.get_f32_le()?;
28922        __struct.yacc = buf.get_f32_le()?;
28923        __struct.zacc = buf.get_f32_le()?;
28924        __struct.xgyro = buf.get_f32_le()?;
28925        __struct.ygyro = buf.get_f32_le()?;
28926        __struct.zgyro = buf.get_f32_le()?;
28927        __struct.lat = buf.get_f32_le()?;
28928        __struct.lon = buf.get_f32_le()?;
28929        __struct.alt = buf.get_f32_le()?;
28930        __struct.std_dev_horz = buf.get_f32_le()?;
28931        __struct.std_dev_vert = buf.get_f32_le()?;
28932        __struct.vn = buf.get_f32_le()?;
28933        __struct.ve = buf.get_f32_le()?;
28934        __struct.vd = buf.get_f32_le()?;
28935        __struct.lat_int = buf.get_i32_le()?;
28936        __struct.lon_int = buf.get_i32_le()?;
28937        Ok(__struct)
28938    }
28939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28940        let mut __tmp = BytesMut::new(bytes);
28941        #[allow(clippy::absurd_extreme_comparisons)]
28942        #[allow(unused_comparisons)]
28943        if __tmp.remaining() < Self::ENCODED_LEN {
28944            panic!(
28945                "buffer is too small (need {} bytes, but got {})",
28946                Self::ENCODED_LEN,
28947                __tmp.remaining(),
28948            )
28949        }
28950        __tmp.put_f32_le(self.q1);
28951        __tmp.put_f32_le(self.q2);
28952        __tmp.put_f32_le(self.q3);
28953        __tmp.put_f32_le(self.q4);
28954        __tmp.put_f32_le(self.roll);
28955        __tmp.put_f32_le(self.pitch);
28956        __tmp.put_f32_le(self.yaw);
28957        __tmp.put_f32_le(self.xacc);
28958        __tmp.put_f32_le(self.yacc);
28959        __tmp.put_f32_le(self.zacc);
28960        __tmp.put_f32_le(self.xgyro);
28961        __tmp.put_f32_le(self.ygyro);
28962        __tmp.put_f32_le(self.zgyro);
28963        __tmp.put_f32_le(self.lat);
28964        __tmp.put_f32_le(self.lon);
28965        __tmp.put_f32_le(self.alt);
28966        __tmp.put_f32_le(self.std_dev_horz);
28967        __tmp.put_f32_le(self.std_dev_vert);
28968        __tmp.put_f32_le(self.vn);
28969        __tmp.put_f32_le(self.ve);
28970        __tmp.put_f32_le(self.vd);
28971        if matches!(version, MavlinkVersion::V2) {
28972            __tmp.put_i32_le(self.lat_int);
28973            __tmp.put_i32_le(self.lon_int);
28974            let len = __tmp.len();
28975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28976        } else {
28977            __tmp.len()
28978        }
28979    }
28980}
28981#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28982#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28983#[doc = ""]
28984#[doc = "ID: 370"]
28985#[derive(Debug, Clone, PartialEq)]
28986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28988#[cfg_attr(feature = "ts", derive(TS))]
28989#[cfg_attr(feature = "ts", ts(export))]
28990pub struct SMART_BATTERY_INFO_DATA {
28991    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28992    pub capacity_full_specification: i32,
28993    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28994    pub capacity_full: i32,
28995    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28996    pub cycle_count: u16,
28997    #[doc = "Battery weight. 0: field not provided."]
28998    pub weight: u16,
28999    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29000    pub discharge_minimum_voltage: u16,
29001    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29002    pub charging_minimum_voltage: u16,
29003    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29004    pub resting_minimum_voltage: u16,
29005    #[doc = "Battery ID"]
29006    pub id: u8,
29007    #[doc = "Function of the battery"]
29008    pub battery_function: MavBatteryFunction,
29009    #[doc = "Type (chemistry) of the battery"]
29010    pub mavtype: MavBatteryType,
29011    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29012    #[cfg_attr(feature = "ts", ts(type = "string"))]
29013    pub serial_number: CharArray<16>,
29014    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29015    #[cfg_attr(feature = "ts", ts(type = "string"))]
29016    pub device_name: CharArray<50>,
29017    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29018    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29019    pub charging_maximum_voltage: u16,
29020    #[doc = "Number of battery cells in series. 0: field not provided."]
29021    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29022    pub cells_in_series: u8,
29023    #[doc = "Maximum pack discharge current. 0: field not provided."]
29024    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29025    pub discharge_maximum_current: u32,
29026    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29027    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29028    pub discharge_maximum_burst_current: u32,
29029    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29030    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29031    #[cfg_attr(feature = "ts", ts(type = "string"))]
29032    pub manufacture_date: CharArray<11>,
29033}
29034impl SMART_BATTERY_INFO_DATA {
29035    pub const ENCODED_LEN: usize = 109usize;
29036    pub const DEFAULT: Self = Self {
29037        capacity_full_specification: 0_i32,
29038        capacity_full: 0_i32,
29039        cycle_count: 0_u16,
29040        weight: 0_u16,
29041        discharge_minimum_voltage: 0_u16,
29042        charging_minimum_voltage: 0_u16,
29043        resting_minimum_voltage: 0_u16,
29044        id: 0_u8,
29045        battery_function: MavBatteryFunction::DEFAULT,
29046        mavtype: MavBatteryType::DEFAULT,
29047        serial_number: CharArray::new([0_u8; 16usize]),
29048        device_name: CharArray::new([0_u8; 50usize]),
29049        charging_maximum_voltage: 0_u16,
29050        cells_in_series: 0_u8,
29051        discharge_maximum_current: 0_u32,
29052        discharge_maximum_burst_current: 0_u32,
29053        manufacture_date: CharArray::new([0_u8; 11usize]),
29054    };
29055    #[cfg(feature = "arbitrary")]
29056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29057        use arbitrary::{Arbitrary, Unstructured};
29058        let mut buf = [0u8; 1024];
29059        rng.fill_bytes(&mut buf);
29060        let mut unstructured = Unstructured::new(&buf);
29061        Self::arbitrary(&mut unstructured).unwrap_or_default()
29062    }
29063}
29064impl Default for SMART_BATTERY_INFO_DATA {
29065    fn default() -> Self {
29066        Self::DEFAULT.clone()
29067    }
29068}
29069impl MessageData for SMART_BATTERY_INFO_DATA {
29070    type Message = MavMessage;
29071    const ID: u32 = 370u32;
29072    const NAME: &'static str = "SMART_BATTERY_INFO";
29073    const EXTRA_CRC: u8 = 75u8;
29074    const ENCODED_LEN: usize = 109usize;
29075    fn deser(
29076        _version: MavlinkVersion,
29077        __input: &[u8],
29078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29079        let avail_len = __input.len();
29080        let mut payload_buf = [0; Self::ENCODED_LEN];
29081        let mut buf = if avail_len < Self::ENCODED_LEN {
29082            payload_buf[0..avail_len].copy_from_slice(__input);
29083            Bytes::new(&payload_buf)
29084        } else {
29085            Bytes::new(__input)
29086        };
29087        let mut __struct = Self::default();
29088        __struct.capacity_full_specification = buf.get_i32_le()?;
29089        __struct.capacity_full = buf.get_i32_le()?;
29090        __struct.cycle_count = buf.get_u16_le()?;
29091        __struct.weight = buf.get_u16_le()?;
29092        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
29093        __struct.charging_minimum_voltage = buf.get_u16_le()?;
29094        __struct.resting_minimum_voltage = buf.get_u16_le()?;
29095        __struct.id = buf.get_u8()?;
29096        let tmp = buf.get_u8()?;
29097        __struct.battery_function =
29098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29099                enum_type: "MavBatteryFunction",
29100                value: tmp as u64,
29101            })?;
29102        let tmp = buf.get_u8()?;
29103        __struct.mavtype =
29104            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29105                enum_type: "MavBatteryType",
29106                value: tmp as u64,
29107            })?;
29108        let mut tmp = [0_u8; 16usize];
29109        for v in &mut tmp {
29110            *v = buf.get_u8()?;
29111        }
29112        __struct.serial_number = CharArray::new(tmp);
29113        let mut tmp = [0_u8; 50usize];
29114        for v in &mut tmp {
29115            *v = buf.get_u8()?;
29116        }
29117        __struct.device_name = CharArray::new(tmp);
29118        __struct.charging_maximum_voltage = buf.get_u16_le()?;
29119        __struct.cells_in_series = buf.get_u8()?;
29120        __struct.discharge_maximum_current = buf.get_u32_le()?;
29121        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
29122        let mut tmp = [0_u8; 11usize];
29123        for v in &mut tmp {
29124            *v = buf.get_u8()?;
29125        }
29126        __struct.manufacture_date = CharArray::new(tmp);
29127        Ok(__struct)
29128    }
29129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29130        let mut __tmp = BytesMut::new(bytes);
29131        #[allow(clippy::absurd_extreme_comparisons)]
29132        #[allow(unused_comparisons)]
29133        if __tmp.remaining() < Self::ENCODED_LEN {
29134            panic!(
29135                "buffer is too small (need {} bytes, but got {})",
29136                Self::ENCODED_LEN,
29137                __tmp.remaining(),
29138            )
29139        }
29140        __tmp.put_i32_le(self.capacity_full_specification);
29141        __tmp.put_i32_le(self.capacity_full);
29142        __tmp.put_u16_le(self.cycle_count);
29143        __tmp.put_u16_le(self.weight);
29144        __tmp.put_u16_le(self.discharge_minimum_voltage);
29145        __tmp.put_u16_le(self.charging_minimum_voltage);
29146        __tmp.put_u16_le(self.resting_minimum_voltage);
29147        __tmp.put_u8(self.id);
29148        __tmp.put_u8(self.battery_function as u8);
29149        __tmp.put_u8(self.mavtype as u8);
29150        for val in &self.serial_number {
29151            __tmp.put_u8(*val);
29152        }
29153        for val in &self.device_name {
29154            __tmp.put_u8(*val);
29155        }
29156        if matches!(version, MavlinkVersion::V2) {
29157            __tmp.put_u16_le(self.charging_maximum_voltage);
29158            __tmp.put_u8(self.cells_in_series);
29159            __tmp.put_u32_le(self.discharge_maximum_current);
29160            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29161            for val in &self.manufacture_date {
29162                __tmp.put_u8(*val);
29163            }
29164            let len = __tmp.len();
29165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29166        } else {
29167            __tmp.len()
29168        }
29169    }
29170}
29171#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29172#[doc = ""]
29173#[doc = "ID: 253"]
29174#[derive(Debug, Clone, PartialEq)]
29175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29177#[cfg_attr(feature = "ts", derive(TS))]
29178#[cfg_attr(feature = "ts", ts(export))]
29179pub struct STATUSTEXT_DATA {
29180    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29181    pub severity: MavSeverity,
29182    #[doc = "Status text message, without null termination character"]
29183    #[cfg_attr(feature = "ts", ts(type = "string"))]
29184    pub text: CharArray<50>,
29185    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29186    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29187    pub id: u16,
29188    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29189    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29190    pub chunk_seq: u8,
29191}
29192impl STATUSTEXT_DATA {
29193    pub const ENCODED_LEN: usize = 54usize;
29194    pub const DEFAULT: Self = Self {
29195        severity: MavSeverity::DEFAULT,
29196        text: CharArray::new([0_u8; 50usize]),
29197        id: 0_u16,
29198        chunk_seq: 0_u8,
29199    };
29200    #[cfg(feature = "arbitrary")]
29201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29202        use arbitrary::{Arbitrary, Unstructured};
29203        let mut buf = [0u8; 1024];
29204        rng.fill_bytes(&mut buf);
29205        let mut unstructured = Unstructured::new(&buf);
29206        Self::arbitrary(&mut unstructured).unwrap_or_default()
29207    }
29208}
29209impl Default for STATUSTEXT_DATA {
29210    fn default() -> Self {
29211        Self::DEFAULT.clone()
29212    }
29213}
29214impl MessageData for STATUSTEXT_DATA {
29215    type Message = MavMessage;
29216    const ID: u32 = 253u32;
29217    const NAME: &'static str = "STATUSTEXT";
29218    const EXTRA_CRC: u8 = 83u8;
29219    const ENCODED_LEN: usize = 54usize;
29220    fn deser(
29221        _version: MavlinkVersion,
29222        __input: &[u8],
29223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29224        let avail_len = __input.len();
29225        let mut payload_buf = [0; Self::ENCODED_LEN];
29226        let mut buf = if avail_len < Self::ENCODED_LEN {
29227            payload_buf[0..avail_len].copy_from_slice(__input);
29228            Bytes::new(&payload_buf)
29229        } else {
29230            Bytes::new(__input)
29231        };
29232        let mut __struct = Self::default();
29233        let tmp = buf.get_u8()?;
29234        __struct.severity =
29235            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29236                enum_type: "MavSeverity",
29237                value: tmp as u64,
29238            })?;
29239        let mut tmp = [0_u8; 50usize];
29240        for v in &mut tmp {
29241            *v = buf.get_u8()?;
29242        }
29243        __struct.text = CharArray::new(tmp);
29244        __struct.id = buf.get_u16_le()?;
29245        __struct.chunk_seq = buf.get_u8()?;
29246        Ok(__struct)
29247    }
29248    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29249        let mut __tmp = BytesMut::new(bytes);
29250        #[allow(clippy::absurd_extreme_comparisons)]
29251        #[allow(unused_comparisons)]
29252        if __tmp.remaining() < Self::ENCODED_LEN {
29253            panic!(
29254                "buffer is too small (need {} bytes, but got {})",
29255                Self::ENCODED_LEN,
29256                __tmp.remaining(),
29257            )
29258        }
29259        __tmp.put_u8(self.severity as u8);
29260        for val in &self.text {
29261            __tmp.put_u8(*val);
29262        }
29263        if matches!(version, MavlinkVersion::V2) {
29264            __tmp.put_u16_le(self.id);
29265            __tmp.put_u8(self.chunk_seq);
29266            let len = __tmp.len();
29267            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29268        } else {
29269            __tmp.len()
29270        }
29271    }
29272}
29273#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29274#[doc = ""]
29275#[doc = "ID: 261"]
29276#[derive(Debug, Clone, PartialEq)]
29277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29279#[cfg_attr(feature = "ts", derive(TS))]
29280#[cfg_attr(feature = "ts", ts(export))]
29281pub struct STORAGE_INFORMATION_DATA {
29282    #[doc = "Timestamp (time since system boot)."]
29283    pub time_boot_ms: u32,
29284    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29285    pub total_capacity: f32,
29286    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29287    pub used_capacity: f32,
29288    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29289    pub available_capacity: f32,
29290    #[doc = "Read speed."]
29291    pub read_speed: f32,
29292    #[doc = "Write speed."]
29293    pub write_speed: f32,
29294    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29295    pub storage_id: u8,
29296    #[doc = "Number of storage devices"]
29297    pub storage_count: u8,
29298    #[doc = "Status of storage"]
29299    pub status: StorageStatus,
29300    #[doc = "Type of storage"]
29301    #[cfg_attr(feature = "serde", serde(default))]
29302    pub mavtype: StorageType,
29303    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29304    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29305    #[cfg_attr(feature = "ts", ts(type = "string"))]
29306    pub name: CharArray<32>,
29307    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29308    #[cfg_attr(feature = "serde", serde(default))]
29309    pub storage_usage: StorageUsageFlag,
29310}
29311impl STORAGE_INFORMATION_DATA {
29312    pub const ENCODED_LEN: usize = 61usize;
29313    pub const DEFAULT: Self = Self {
29314        time_boot_ms: 0_u32,
29315        total_capacity: 0.0_f32,
29316        used_capacity: 0.0_f32,
29317        available_capacity: 0.0_f32,
29318        read_speed: 0.0_f32,
29319        write_speed: 0.0_f32,
29320        storage_id: 0_u8,
29321        storage_count: 0_u8,
29322        status: StorageStatus::DEFAULT,
29323        mavtype: StorageType::DEFAULT,
29324        name: CharArray::new([0_u8; 32usize]),
29325        storage_usage: StorageUsageFlag::DEFAULT,
29326    };
29327    #[cfg(feature = "arbitrary")]
29328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29329        use arbitrary::{Arbitrary, Unstructured};
29330        let mut buf = [0u8; 1024];
29331        rng.fill_bytes(&mut buf);
29332        let mut unstructured = Unstructured::new(&buf);
29333        Self::arbitrary(&mut unstructured).unwrap_or_default()
29334    }
29335}
29336impl Default for STORAGE_INFORMATION_DATA {
29337    fn default() -> Self {
29338        Self::DEFAULT.clone()
29339    }
29340}
29341impl MessageData for STORAGE_INFORMATION_DATA {
29342    type Message = MavMessage;
29343    const ID: u32 = 261u32;
29344    const NAME: &'static str = "STORAGE_INFORMATION";
29345    const EXTRA_CRC: u8 = 179u8;
29346    const ENCODED_LEN: usize = 61usize;
29347    fn deser(
29348        _version: MavlinkVersion,
29349        __input: &[u8],
29350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29351        let avail_len = __input.len();
29352        let mut payload_buf = [0; Self::ENCODED_LEN];
29353        let mut buf = if avail_len < Self::ENCODED_LEN {
29354            payload_buf[0..avail_len].copy_from_slice(__input);
29355            Bytes::new(&payload_buf)
29356        } else {
29357            Bytes::new(__input)
29358        };
29359        let mut __struct = Self::default();
29360        __struct.time_boot_ms = buf.get_u32_le()?;
29361        __struct.total_capacity = buf.get_f32_le()?;
29362        __struct.used_capacity = buf.get_f32_le()?;
29363        __struct.available_capacity = buf.get_f32_le()?;
29364        __struct.read_speed = buf.get_f32_le()?;
29365        __struct.write_speed = buf.get_f32_le()?;
29366        __struct.storage_id = buf.get_u8()?;
29367        __struct.storage_count = buf.get_u8()?;
29368        let tmp = buf.get_u8()?;
29369        __struct.status =
29370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29371                enum_type: "StorageStatus",
29372                value: tmp as u64,
29373            })?;
29374        let tmp = buf.get_u8()?;
29375        __struct.mavtype =
29376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29377                enum_type: "StorageType",
29378                value: tmp as u64,
29379            })?;
29380        let mut tmp = [0_u8; 32usize];
29381        for v in &mut tmp {
29382            *v = buf.get_u8()?;
29383        }
29384        __struct.name = CharArray::new(tmp);
29385        let tmp = buf.get_u8()?;
29386        __struct.storage_usage = StorageUsageFlag::from_bits(
29387            tmp as <StorageUsageFlag as Flags>::Bits,
29388        )
29389        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29390            flag_type: "StorageUsageFlag",
29391            value: tmp as u64,
29392        })?;
29393        Ok(__struct)
29394    }
29395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29396        let mut __tmp = BytesMut::new(bytes);
29397        #[allow(clippy::absurd_extreme_comparisons)]
29398        #[allow(unused_comparisons)]
29399        if __tmp.remaining() < Self::ENCODED_LEN {
29400            panic!(
29401                "buffer is too small (need {} bytes, but got {})",
29402                Self::ENCODED_LEN,
29403                __tmp.remaining(),
29404            )
29405        }
29406        __tmp.put_u32_le(self.time_boot_ms);
29407        __tmp.put_f32_le(self.total_capacity);
29408        __tmp.put_f32_le(self.used_capacity);
29409        __tmp.put_f32_le(self.available_capacity);
29410        __tmp.put_f32_le(self.read_speed);
29411        __tmp.put_f32_le(self.write_speed);
29412        __tmp.put_u8(self.storage_id);
29413        __tmp.put_u8(self.storage_count);
29414        __tmp.put_u8(self.status as u8);
29415        if matches!(version, MavlinkVersion::V2) {
29416            __tmp.put_u8(self.mavtype as u8);
29417            for val in &self.name {
29418                __tmp.put_u8(*val);
29419            }
29420            __tmp.put_u8(self.storage_usage.bits() as u8);
29421            let len = __tmp.len();
29422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29423        } else {
29424            __tmp.len()
29425        }
29426    }
29427}
29428#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29429#[doc = ""]
29430#[doc = "ID: 401"]
29431#[derive(Debug, Clone, PartialEq)]
29432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29434#[cfg_attr(feature = "ts", derive(TS))]
29435#[cfg_attr(feature = "ts", ts(export))]
29436pub struct SUPPORTED_TUNES_DATA {
29437    #[doc = "Bitfield of supported tune formats."]
29438    pub format: TuneFormat,
29439    #[doc = "System ID"]
29440    pub target_system: u8,
29441    #[doc = "Component ID"]
29442    pub target_component: u8,
29443}
29444impl SUPPORTED_TUNES_DATA {
29445    pub const ENCODED_LEN: usize = 6usize;
29446    pub const DEFAULT: Self = Self {
29447        format: TuneFormat::DEFAULT,
29448        target_system: 0_u8,
29449        target_component: 0_u8,
29450    };
29451    #[cfg(feature = "arbitrary")]
29452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29453        use arbitrary::{Arbitrary, Unstructured};
29454        let mut buf = [0u8; 1024];
29455        rng.fill_bytes(&mut buf);
29456        let mut unstructured = Unstructured::new(&buf);
29457        Self::arbitrary(&mut unstructured).unwrap_or_default()
29458    }
29459}
29460impl Default for SUPPORTED_TUNES_DATA {
29461    fn default() -> Self {
29462        Self::DEFAULT.clone()
29463    }
29464}
29465impl MessageData for SUPPORTED_TUNES_DATA {
29466    type Message = MavMessage;
29467    const ID: u32 = 401u32;
29468    const NAME: &'static str = "SUPPORTED_TUNES";
29469    const EXTRA_CRC: u8 = 183u8;
29470    const ENCODED_LEN: usize = 6usize;
29471    fn deser(
29472        _version: MavlinkVersion,
29473        __input: &[u8],
29474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29475        let avail_len = __input.len();
29476        let mut payload_buf = [0; Self::ENCODED_LEN];
29477        let mut buf = if avail_len < Self::ENCODED_LEN {
29478            payload_buf[0..avail_len].copy_from_slice(__input);
29479            Bytes::new(&payload_buf)
29480        } else {
29481            Bytes::new(__input)
29482        };
29483        let mut __struct = Self::default();
29484        let tmp = buf.get_u32_le()?;
29485        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29486            ::mavlink_core::error::ParserError::InvalidEnum {
29487                enum_type: "TuneFormat",
29488                value: tmp as u64,
29489            },
29490        )?;
29491        __struct.target_system = buf.get_u8()?;
29492        __struct.target_component = buf.get_u8()?;
29493        Ok(__struct)
29494    }
29495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29496        let mut __tmp = BytesMut::new(bytes);
29497        #[allow(clippy::absurd_extreme_comparisons)]
29498        #[allow(unused_comparisons)]
29499        if __tmp.remaining() < Self::ENCODED_LEN {
29500            panic!(
29501                "buffer is too small (need {} bytes, but got {})",
29502                Self::ENCODED_LEN,
29503                __tmp.remaining(),
29504            )
29505        }
29506        __tmp.put_u32_le(self.format as u32);
29507        __tmp.put_u8(self.target_system);
29508        __tmp.put_u8(self.target_component);
29509        if matches!(version, MavlinkVersion::V2) {
29510            let len = __tmp.len();
29511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29512        } else {
29513            __tmp.len()
29514        }
29515    }
29516}
29517#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29518#[doc = ""]
29519#[doc = "ID: 2"]
29520#[derive(Debug, Clone, PartialEq)]
29521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29523#[cfg_attr(feature = "ts", derive(TS))]
29524#[cfg_attr(feature = "ts", ts(export))]
29525pub struct SYSTEM_TIME_DATA {
29526    #[doc = "Timestamp (UNIX epoch time)."]
29527    pub time_unix_usec: u64,
29528    #[doc = "Timestamp (time since system boot)."]
29529    pub time_boot_ms: u32,
29530}
29531impl SYSTEM_TIME_DATA {
29532    pub const ENCODED_LEN: usize = 12usize;
29533    pub const DEFAULT: Self = Self {
29534        time_unix_usec: 0_u64,
29535        time_boot_ms: 0_u32,
29536    };
29537    #[cfg(feature = "arbitrary")]
29538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29539        use arbitrary::{Arbitrary, Unstructured};
29540        let mut buf = [0u8; 1024];
29541        rng.fill_bytes(&mut buf);
29542        let mut unstructured = Unstructured::new(&buf);
29543        Self::arbitrary(&mut unstructured).unwrap_or_default()
29544    }
29545}
29546impl Default for SYSTEM_TIME_DATA {
29547    fn default() -> Self {
29548        Self::DEFAULT.clone()
29549    }
29550}
29551impl MessageData for SYSTEM_TIME_DATA {
29552    type Message = MavMessage;
29553    const ID: u32 = 2u32;
29554    const NAME: &'static str = "SYSTEM_TIME";
29555    const EXTRA_CRC: u8 = 137u8;
29556    const ENCODED_LEN: usize = 12usize;
29557    fn deser(
29558        _version: MavlinkVersion,
29559        __input: &[u8],
29560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29561        let avail_len = __input.len();
29562        let mut payload_buf = [0; Self::ENCODED_LEN];
29563        let mut buf = if avail_len < Self::ENCODED_LEN {
29564            payload_buf[0..avail_len].copy_from_slice(__input);
29565            Bytes::new(&payload_buf)
29566        } else {
29567            Bytes::new(__input)
29568        };
29569        let mut __struct = Self::default();
29570        __struct.time_unix_usec = buf.get_u64_le()?;
29571        __struct.time_boot_ms = buf.get_u32_le()?;
29572        Ok(__struct)
29573    }
29574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29575        let mut __tmp = BytesMut::new(bytes);
29576        #[allow(clippy::absurd_extreme_comparisons)]
29577        #[allow(unused_comparisons)]
29578        if __tmp.remaining() < Self::ENCODED_LEN {
29579            panic!(
29580                "buffer is too small (need {} bytes, but got {})",
29581                Self::ENCODED_LEN,
29582                __tmp.remaining(),
29583            )
29584        }
29585        __tmp.put_u64_le(self.time_unix_usec);
29586        __tmp.put_u32_le(self.time_boot_ms);
29587        if matches!(version, MavlinkVersion::V2) {
29588            let len = __tmp.len();
29589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29590        } else {
29591            __tmp.len()
29592        }
29593    }
29594}
29595#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29596#[doc = ""]
29597#[doc = "ID: 1"]
29598#[derive(Debug, Clone, PartialEq)]
29599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29601#[cfg_attr(feature = "ts", derive(TS))]
29602#[cfg_attr(feature = "ts", ts(export))]
29603pub struct SYS_STATUS_DATA {
29604    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29605    pub onboard_control_sensors_present: MavSysStatusSensor,
29606    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29607    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29608    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29609    pub onboard_control_sensors_health: MavSysStatusSensor,
29610    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29611    pub load: u16,
29612    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29613    pub voltage_battery: u16,
29614    #[doc = "Battery current, -1: Current not sent by autopilot"]
29615    pub current_battery: i16,
29616    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29617    pub drop_rate_comm: u16,
29618    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29619    pub errors_comm: u16,
29620    #[doc = "Autopilot-specific errors"]
29621    pub errors_count1: u16,
29622    #[doc = "Autopilot-specific errors"]
29623    pub errors_count2: u16,
29624    #[doc = "Autopilot-specific errors"]
29625    pub errors_count3: u16,
29626    #[doc = "Autopilot-specific errors"]
29627    pub errors_count4: u16,
29628    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29629    pub battery_remaining: i8,
29630    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29631    #[cfg_attr(feature = "serde", serde(default))]
29632    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29633    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29634    #[cfg_attr(feature = "serde", serde(default))]
29635    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29636    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29637    #[cfg_attr(feature = "serde", serde(default))]
29638    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29639}
29640impl SYS_STATUS_DATA {
29641    pub const ENCODED_LEN: usize = 43usize;
29642    pub const DEFAULT: Self = Self {
29643        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29644        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29645        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29646        load: 0_u16,
29647        voltage_battery: 0_u16,
29648        current_battery: 0_i16,
29649        drop_rate_comm: 0_u16,
29650        errors_comm: 0_u16,
29651        errors_count1: 0_u16,
29652        errors_count2: 0_u16,
29653        errors_count3: 0_u16,
29654        errors_count4: 0_u16,
29655        battery_remaining: 0_i8,
29656        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29657        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29658        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29659    };
29660    #[cfg(feature = "arbitrary")]
29661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29662        use arbitrary::{Arbitrary, Unstructured};
29663        let mut buf = [0u8; 1024];
29664        rng.fill_bytes(&mut buf);
29665        let mut unstructured = Unstructured::new(&buf);
29666        Self::arbitrary(&mut unstructured).unwrap_or_default()
29667    }
29668}
29669impl Default for SYS_STATUS_DATA {
29670    fn default() -> Self {
29671        Self::DEFAULT.clone()
29672    }
29673}
29674impl MessageData for SYS_STATUS_DATA {
29675    type Message = MavMessage;
29676    const ID: u32 = 1u32;
29677    const NAME: &'static str = "SYS_STATUS";
29678    const EXTRA_CRC: u8 = 124u8;
29679    const ENCODED_LEN: usize = 43usize;
29680    fn deser(
29681        _version: MavlinkVersion,
29682        __input: &[u8],
29683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29684        let avail_len = __input.len();
29685        let mut payload_buf = [0; Self::ENCODED_LEN];
29686        let mut buf = if avail_len < Self::ENCODED_LEN {
29687            payload_buf[0..avail_len].copy_from_slice(__input);
29688            Bytes::new(&payload_buf)
29689        } else {
29690            Bytes::new(__input)
29691        };
29692        let mut __struct = Self::default();
29693        let tmp = buf.get_u32_le()?;
29694        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29695            tmp as <MavSysStatusSensor as Flags>::Bits,
29696        )
29697        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29698            flag_type: "MavSysStatusSensor",
29699            value: tmp as u64,
29700        })?;
29701        let tmp = buf.get_u32_le()?;
29702        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29703            tmp as <MavSysStatusSensor as Flags>::Bits,
29704        )
29705        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29706            flag_type: "MavSysStatusSensor",
29707            value: tmp as u64,
29708        })?;
29709        let tmp = buf.get_u32_le()?;
29710        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29711            tmp as <MavSysStatusSensor as Flags>::Bits,
29712        )
29713        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29714            flag_type: "MavSysStatusSensor",
29715            value: tmp as u64,
29716        })?;
29717        __struct.load = buf.get_u16_le()?;
29718        __struct.voltage_battery = buf.get_u16_le()?;
29719        __struct.current_battery = buf.get_i16_le()?;
29720        __struct.drop_rate_comm = buf.get_u16_le()?;
29721        __struct.errors_comm = buf.get_u16_le()?;
29722        __struct.errors_count1 = buf.get_u16_le()?;
29723        __struct.errors_count2 = buf.get_u16_le()?;
29724        __struct.errors_count3 = buf.get_u16_le()?;
29725        __struct.errors_count4 = buf.get_u16_le()?;
29726        __struct.battery_remaining = buf.get_i8()?;
29727        let tmp = buf.get_u32_le()?;
29728        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29729            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29730        )
29731        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29732            flag_type: "MavSysStatusSensorExtended",
29733            value: tmp as u64,
29734        })?;
29735        let tmp = buf.get_u32_le()?;
29736        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29737            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29738        )
29739        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29740            flag_type: "MavSysStatusSensorExtended",
29741            value: tmp as u64,
29742        })?;
29743        let tmp = buf.get_u32_le()?;
29744        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29745            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29746        )
29747        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29748            flag_type: "MavSysStatusSensorExtended",
29749            value: tmp as u64,
29750        })?;
29751        Ok(__struct)
29752    }
29753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29754        let mut __tmp = BytesMut::new(bytes);
29755        #[allow(clippy::absurd_extreme_comparisons)]
29756        #[allow(unused_comparisons)]
29757        if __tmp.remaining() < Self::ENCODED_LEN {
29758            panic!(
29759                "buffer is too small (need {} bytes, but got {})",
29760                Self::ENCODED_LEN,
29761                __tmp.remaining(),
29762            )
29763        }
29764        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29765        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29766        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29767        __tmp.put_u16_le(self.load);
29768        __tmp.put_u16_le(self.voltage_battery);
29769        __tmp.put_i16_le(self.current_battery);
29770        __tmp.put_u16_le(self.drop_rate_comm);
29771        __tmp.put_u16_le(self.errors_comm);
29772        __tmp.put_u16_le(self.errors_count1);
29773        __tmp.put_u16_le(self.errors_count2);
29774        __tmp.put_u16_le(self.errors_count3);
29775        __tmp.put_u16_le(self.errors_count4);
29776        __tmp.put_i8(self.battery_remaining);
29777        if matches!(version, MavlinkVersion::V2) {
29778            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29779            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29780            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29781            let len = __tmp.len();
29782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29783        } else {
29784            __tmp.len()
29785        }
29786    }
29787}
29788#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29789#[doc = ""]
29790#[doc = "ID: 135"]
29791#[derive(Debug, Clone, PartialEq)]
29792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29794#[cfg_attr(feature = "ts", derive(TS))]
29795#[cfg_attr(feature = "ts", ts(export))]
29796pub struct TERRAIN_CHECK_DATA {
29797    #[doc = "Latitude"]
29798    pub lat: i32,
29799    #[doc = "Longitude"]
29800    pub lon: i32,
29801}
29802impl TERRAIN_CHECK_DATA {
29803    pub const ENCODED_LEN: usize = 8usize;
29804    pub const DEFAULT: Self = Self {
29805        lat: 0_i32,
29806        lon: 0_i32,
29807    };
29808    #[cfg(feature = "arbitrary")]
29809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29810        use arbitrary::{Arbitrary, Unstructured};
29811        let mut buf = [0u8; 1024];
29812        rng.fill_bytes(&mut buf);
29813        let mut unstructured = Unstructured::new(&buf);
29814        Self::arbitrary(&mut unstructured).unwrap_or_default()
29815    }
29816}
29817impl Default for TERRAIN_CHECK_DATA {
29818    fn default() -> Self {
29819        Self::DEFAULT.clone()
29820    }
29821}
29822impl MessageData for TERRAIN_CHECK_DATA {
29823    type Message = MavMessage;
29824    const ID: u32 = 135u32;
29825    const NAME: &'static str = "TERRAIN_CHECK";
29826    const EXTRA_CRC: u8 = 203u8;
29827    const ENCODED_LEN: usize = 8usize;
29828    fn deser(
29829        _version: MavlinkVersion,
29830        __input: &[u8],
29831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29832        let avail_len = __input.len();
29833        let mut payload_buf = [0; Self::ENCODED_LEN];
29834        let mut buf = if avail_len < Self::ENCODED_LEN {
29835            payload_buf[0..avail_len].copy_from_slice(__input);
29836            Bytes::new(&payload_buf)
29837        } else {
29838            Bytes::new(__input)
29839        };
29840        let mut __struct = Self::default();
29841        __struct.lat = buf.get_i32_le()?;
29842        __struct.lon = buf.get_i32_le()?;
29843        Ok(__struct)
29844    }
29845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29846        let mut __tmp = BytesMut::new(bytes);
29847        #[allow(clippy::absurd_extreme_comparisons)]
29848        #[allow(unused_comparisons)]
29849        if __tmp.remaining() < Self::ENCODED_LEN {
29850            panic!(
29851                "buffer is too small (need {} bytes, but got {})",
29852                Self::ENCODED_LEN,
29853                __tmp.remaining(),
29854            )
29855        }
29856        __tmp.put_i32_le(self.lat);
29857        __tmp.put_i32_le(self.lon);
29858        if matches!(version, MavlinkVersion::V2) {
29859            let len = __tmp.len();
29860            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29861        } else {
29862            __tmp.len()
29863        }
29864    }
29865}
29866#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29867#[doc = ""]
29868#[doc = "ID: 134"]
29869#[derive(Debug, Clone, PartialEq)]
29870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29872#[cfg_attr(feature = "ts", derive(TS))]
29873#[cfg_attr(feature = "ts", ts(export))]
29874pub struct TERRAIN_DATA_DATA {
29875    #[doc = "Latitude of SW corner of first grid"]
29876    pub lat: i32,
29877    #[doc = "Longitude of SW corner of first grid"]
29878    pub lon: i32,
29879    #[doc = "Grid spacing"]
29880    pub grid_spacing: u16,
29881    #[doc = "Terrain data MSL"]
29882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29883    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29884    pub data: [i16; 16],
29885    #[doc = "bit within the terrain request mask"]
29886    pub gridbit: u8,
29887}
29888impl TERRAIN_DATA_DATA {
29889    pub const ENCODED_LEN: usize = 43usize;
29890    pub const DEFAULT: Self = Self {
29891        lat: 0_i32,
29892        lon: 0_i32,
29893        grid_spacing: 0_u16,
29894        data: [0_i16; 16usize],
29895        gridbit: 0_u8,
29896    };
29897    #[cfg(feature = "arbitrary")]
29898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29899        use arbitrary::{Arbitrary, Unstructured};
29900        let mut buf = [0u8; 1024];
29901        rng.fill_bytes(&mut buf);
29902        let mut unstructured = Unstructured::new(&buf);
29903        Self::arbitrary(&mut unstructured).unwrap_or_default()
29904    }
29905}
29906impl Default for TERRAIN_DATA_DATA {
29907    fn default() -> Self {
29908        Self::DEFAULT.clone()
29909    }
29910}
29911impl MessageData for TERRAIN_DATA_DATA {
29912    type Message = MavMessage;
29913    const ID: u32 = 134u32;
29914    const NAME: &'static str = "TERRAIN_DATA";
29915    const EXTRA_CRC: u8 = 229u8;
29916    const ENCODED_LEN: usize = 43usize;
29917    fn deser(
29918        _version: MavlinkVersion,
29919        __input: &[u8],
29920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29921        let avail_len = __input.len();
29922        let mut payload_buf = [0; Self::ENCODED_LEN];
29923        let mut buf = if avail_len < Self::ENCODED_LEN {
29924            payload_buf[0..avail_len].copy_from_slice(__input);
29925            Bytes::new(&payload_buf)
29926        } else {
29927            Bytes::new(__input)
29928        };
29929        let mut __struct = Self::default();
29930        __struct.lat = buf.get_i32_le()?;
29931        __struct.lon = buf.get_i32_le()?;
29932        __struct.grid_spacing = buf.get_u16_le()?;
29933        for v in &mut __struct.data {
29934            let val = buf.get_i16_le()?;
29935            *v = val;
29936        }
29937        __struct.gridbit = buf.get_u8()?;
29938        Ok(__struct)
29939    }
29940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29941        let mut __tmp = BytesMut::new(bytes);
29942        #[allow(clippy::absurd_extreme_comparisons)]
29943        #[allow(unused_comparisons)]
29944        if __tmp.remaining() < Self::ENCODED_LEN {
29945            panic!(
29946                "buffer is too small (need {} bytes, but got {})",
29947                Self::ENCODED_LEN,
29948                __tmp.remaining(),
29949            )
29950        }
29951        __tmp.put_i32_le(self.lat);
29952        __tmp.put_i32_le(self.lon);
29953        __tmp.put_u16_le(self.grid_spacing);
29954        for val in &self.data {
29955            __tmp.put_i16_le(*val);
29956        }
29957        __tmp.put_u8(self.gridbit);
29958        if matches!(version, MavlinkVersion::V2) {
29959            let len = __tmp.len();
29960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29961        } else {
29962            __tmp.len()
29963        }
29964    }
29965}
29966#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29967#[doc = ""]
29968#[doc = "ID: 136"]
29969#[derive(Debug, Clone, PartialEq)]
29970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29972#[cfg_attr(feature = "ts", derive(TS))]
29973#[cfg_attr(feature = "ts", ts(export))]
29974pub struct TERRAIN_REPORT_DATA {
29975    #[doc = "Latitude"]
29976    pub lat: i32,
29977    #[doc = "Longitude"]
29978    pub lon: i32,
29979    #[doc = "Terrain height MSL"]
29980    pub terrain_height: f32,
29981    #[doc = "Current vehicle height above lat/lon terrain height"]
29982    pub current_height: f32,
29983    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29984    pub spacing: u16,
29985    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29986    pub pending: u16,
29987    #[doc = "Number of 4x4 terrain blocks in memory"]
29988    pub loaded: u16,
29989}
29990impl TERRAIN_REPORT_DATA {
29991    pub const ENCODED_LEN: usize = 22usize;
29992    pub const DEFAULT: Self = Self {
29993        lat: 0_i32,
29994        lon: 0_i32,
29995        terrain_height: 0.0_f32,
29996        current_height: 0.0_f32,
29997        spacing: 0_u16,
29998        pending: 0_u16,
29999        loaded: 0_u16,
30000    };
30001    #[cfg(feature = "arbitrary")]
30002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30003        use arbitrary::{Arbitrary, Unstructured};
30004        let mut buf = [0u8; 1024];
30005        rng.fill_bytes(&mut buf);
30006        let mut unstructured = Unstructured::new(&buf);
30007        Self::arbitrary(&mut unstructured).unwrap_or_default()
30008    }
30009}
30010impl Default for TERRAIN_REPORT_DATA {
30011    fn default() -> Self {
30012        Self::DEFAULT.clone()
30013    }
30014}
30015impl MessageData for TERRAIN_REPORT_DATA {
30016    type Message = MavMessage;
30017    const ID: u32 = 136u32;
30018    const NAME: &'static str = "TERRAIN_REPORT";
30019    const EXTRA_CRC: u8 = 1u8;
30020    const ENCODED_LEN: usize = 22usize;
30021    fn deser(
30022        _version: MavlinkVersion,
30023        __input: &[u8],
30024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30025        let avail_len = __input.len();
30026        let mut payload_buf = [0; Self::ENCODED_LEN];
30027        let mut buf = if avail_len < Self::ENCODED_LEN {
30028            payload_buf[0..avail_len].copy_from_slice(__input);
30029            Bytes::new(&payload_buf)
30030        } else {
30031            Bytes::new(__input)
30032        };
30033        let mut __struct = Self::default();
30034        __struct.lat = buf.get_i32_le()?;
30035        __struct.lon = buf.get_i32_le()?;
30036        __struct.terrain_height = buf.get_f32_le()?;
30037        __struct.current_height = buf.get_f32_le()?;
30038        __struct.spacing = buf.get_u16_le()?;
30039        __struct.pending = buf.get_u16_le()?;
30040        __struct.loaded = buf.get_u16_le()?;
30041        Ok(__struct)
30042    }
30043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30044        let mut __tmp = BytesMut::new(bytes);
30045        #[allow(clippy::absurd_extreme_comparisons)]
30046        #[allow(unused_comparisons)]
30047        if __tmp.remaining() < Self::ENCODED_LEN {
30048            panic!(
30049                "buffer is too small (need {} bytes, but got {})",
30050                Self::ENCODED_LEN,
30051                __tmp.remaining(),
30052            )
30053        }
30054        __tmp.put_i32_le(self.lat);
30055        __tmp.put_i32_le(self.lon);
30056        __tmp.put_f32_le(self.terrain_height);
30057        __tmp.put_f32_le(self.current_height);
30058        __tmp.put_u16_le(self.spacing);
30059        __tmp.put_u16_le(self.pending);
30060        __tmp.put_u16_le(self.loaded);
30061        if matches!(version, MavlinkVersion::V2) {
30062            let len = __tmp.len();
30063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30064        } else {
30065            __tmp.len()
30066        }
30067    }
30068}
30069#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30070#[doc = ""]
30071#[doc = "ID: 133"]
30072#[derive(Debug, Clone, PartialEq)]
30073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30075#[cfg_attr(feature = "ts", derive(TS))]
30076#[cfg_attr(feature = "ts", ts(export))]
30077pub struct TERRAIN_REQUEST_DATA {
30078    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30079    pub mask: u64,
30080    #[doc = "Latitude of SW corner of first grid"]
30081    pub lat: i32,
30082    #[doc = "Longitude of SW corner of first grid"]
30083    pub lon: i32,
30084    #[doc = "Grid spacing"]
30085    pub grid_spacing: u16,
30086}
30087impl TERRAIN_REQUEST_DATA {
30088    pub const ENCODED_LEN: usize = 18usize;
30089    pub const DEFAULT: Self = Self {
30090        mask: 0_u64,
30091        lat: 0_i32,
30092        lon: 0_i32,
30093        grid_spacing: 0_u16,
30094    };
30095    #[cfg(feature = "arbitrary")]
30096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30097        use arbitrary::{Arbitrary, Unstructured};
30098        let mut buf = [0u8; 1024];
30099        rng.fill_bytes(&mut buf);
30100        let mut unstructured = Unstructured::new(&buf);
30101        Self::arbitrary(&mut unstructured).unwrap_or_default()
30102    }
30103}
30104impl Default for TERRAIN_REQUEST_DATA {
30105    fn default() -> Self {
30106        Self::DEFAULT.clone()
30107    }
30108}
30109impl MessageData for TERRAIN_REQUEST_DATA {
30110    type Message = MavMessage;
30111    const ID: u32 = 133u32;
30112    const NAME: &'static str = "TERRAIN_REQUEST";
30113    const EXTRA_CRC: u8 = 6u8;
30114    const ENCODED_LEN: usize = 18usize;
30115    fn deser(
30116        _version: MavlinkVersion,
30117        __input: &[u8],
30118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30119        let avail_len = __input.len();
30120        let mut payload_buf = [0; Self::ENCODED_LEN];
30121        let mut buf = if avail_len < Self::ENCODED_LEN {
30122            payload_buf[0..avail_len].copy_from_slice(__input);
30123            Bytes::new(&payload_buf)
30124        } else {
30125            Bytes::new(__input)
30126        };
30127        let mut __struct = Self::default();
30128        __struct.mask = buf.get_u64_le()?;
30129        __struct.lat = buf.get_i32_le()?;
30130        __struct.lon = buf.get_i32_le()?;
30131        __struct.grid_spacing = buf.get_u16_le()?;
30132        Ok(__struct)
30133    }
30134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30135        let mut __tmp = BytesMut::new(bytes);
30136        #[allow(clippy::absurd_extreme_comparisons)]
30137        #[allow(unused_comparisons)]
30138        if __tmp.remaining() < Self::ENCODED_LEN {
30139            panic!(
30140                "buffer is too small (need {} bytes, but got {})",
30141                Self::ENCODED_LEN,
30142                __tmp.remaining(),
30143            )
30144        }
30145        __tmp.put_u64_le(self.mask);
30146        __tmp.put_i32_le(self.lat);
30147        __tmp.put_i32_le(self.lon);
30148        __tmp.put_u16_le(self.grid_spacing);
30149        if matches!(version, MavlinkVersion::V2) {
30150            let len = __tmp.len();
30151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30152        } else {
30153            __tmp.len()
30154        }
30155    }
30156}
30157#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30158#[doc = ""]
30159#[doc = "ID: 111"]
30160#[derive(Debug, Clone, PartialEq)]
30161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30163#[cfg_attr(feature = "ts", derive(TS))]
30164#[cfg_attr(feature = "ts", ts(export))]
30165pub struct TIMESYNC_DATA {
30166    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30167    pub tc1: i64,
30168    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30169    pub ts1: i64,
30170    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30171    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30172    pub target_system: u8,
30173    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30174    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30175    pub target_component: u8,
30176}
30177impl TIMESYNC_DATA {
30178    pub const ENCODED_LEN: usize = 18usize;
30179    pub const DEFAULT: Self = Self {
30180        tc1: 0_i64,
30181        ts1: 0_i64,
30182        target_system: 0_u8,
30183        target_component: 0_u8,
30184    };
30185    #[cfg(feature = "arbitrary")]
30186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30187        use arbitrary::{Arbitrary, Unstructured};
30188        let mut buf = [0u8; 1024];
30189        rng.fill_bytes(&mut buf);
30190        let mut unstructured = Unstructured::new(&buf);
30191        Self::arbitrary(&mut unstructured).unwrap_or_default()
30192    }
30193}
30194impl Default for TIMESYNC_DATA {
30195    fn default() -> Self {
30196        Self::DEFAULT.clone()
30197    }
30198}
30199impl MessageData for TIMESYNC_DATA {
30200    type Message = MavMessage;
30201    const ID: u32 = 111u32;
30202    const NAME: &'static str = "TIMESYNC";
30203    const EXTRA_CRC: u8 = 34u8;
30204    const ENCODED_LEN: usize = 18usize;
30205    fn deser(
30206        _version: MavlinkVersion,
30207        __input: &[u8],
30208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30209        let avail_len = __input.len();
30210        let mut payload_buf = [0; Self::ENCODED_LEN];
30211        let mut buf = if avail_len < Self::ENCODED_LEN {
30212            payload_buf[0..avail_len].copy_from_slice(__input);
30213            Bytes::new(&payload_buf)
30214        } else {
30215            Bytes::new(__input)
30216        };
30217        let mut __struct = Self::default();
30218        __struct.tc1 = buf.get_i64_le()?;
30219        __struct.ts1 = buf.get_i64_le()?;
30220        __struct.target_system = buf.get_u8()?;
30221        __struct.target_component = buf.get_u8()?;
30222        Ok(__struct)
30223    }
30224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30225        let mut __tmp = BytesMut::new(bytes);
30226        #[allow(clippy::absurd_extreme_comparisons)]
30227        #[allow(unused_comparisons)]
30228        if __tmp.remaining() < Self::ENCODED_LEN {
30229            panic!(
30230                "buffer is too small (need {} bytes, but got {})",
30231                Self::ENCODED_LEN,
30232                __tmp.remaining(),
30233            )
30234        }
30235        __tmp.put_i64_le(self.tc1);
30236        __tmp.put_i64_le(self.ts1);
30237        if matches!(version, MavlinkVersion::V2) {
30238            __tmp.put_u8(self.target_system);
30239            __tmp.put_u8(self.target_component);
30240            let len = __tmp.len();
30241            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30242        } else {
30243            __tmp.len()
30244        }
30245    }
30246}
30247#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30248#[doc = ""]
30249#[doc = "ID: 380"]
30250#[derive(Debug, Clone, PartialEq)]
30251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30253#[cfg_attr(feature = "ts", derive(TS))]
30254#[cfg_attr(feature = "ts", ts(export))]
30255pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30256    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30257    pub safe_return: i32,
30258    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30259    pub land: i32,
30260    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30261    pub mission_next_item: i32,
30262    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30263    pub mission_end: i32,
30264    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30265    pub commanded_action: i32,
30266}
30267impl TIME_ESTIMATE_TO_TARGET_DATA {
30268    pub const ENCODED_LEN: usize = 20usize;
30269    pub const DEFAULT: Self = Self {
30270        safe_return: 0_i32,
30271        land: 0_i32,
30272        mission_next_item: 0_i32,
30273        mission_end: 0_i32,
30274        commanded_action: 0_i32,
30275    };
30276    #[cfg(feature = "arbitrary")]
30277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30278        use arbitrary::{Arbitrary, Unstructured};
30279        let mut buf = [0u8; 1024];
30280        rng.fill_bytes(&mut buf);
30281        let mut unstructured = Unstructured::new(&buf);
30282        Self::arbitrary(&mut unstructured).unwrap_or_default()
30283    }
30284}
30285impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30286    fn default() -> Self {
30287        Self::DEFAULT.clone()
30288    }
30289}
30290impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30291    type Message = MavMessage;
30292    const ID: u32 = 380u32;
30293    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30294    const EXTRA_CRC: u8 = 232u8;
30295    const ENCODED_LEN: usize = 20usize;
30296    fn deser(
30297        _version: MavlinkVersion,
30298        __input: &[u8],
30299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30300        let avail_len = __input.len();
30301        let mut payload_buf = [0; Self::ENCODED_LEN];
30302        let mut buf = if avail_len < Self::ENCODED_LEN {
30303            payload_buf[0..avail_len].copy_from_slice(__input);
30304            Bytes::new(&payload_buf)
30305        } else {
30306            Bytes::new(__input)
30307        };
30308        let mut __struct = Self::default();
30309        __struct.safe_return = buf.get_i32_le()?;
30310        __struct.land = buf.get_i32_le()?;
30311        __struct.mission_next_item = buf.get_i32_le()?;
30312        __struct.mission_end = buf.get_i32_le()?;
30313        __struct.commanded_action = buf.get_i32_le()?;
30314        Ok(__struct)
30315    }
30316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30317        let mut __tmp = BytesMut::new(bytes);
30318        #[allow(clippy::absurd_extreme_comparisons)]
30319        #[allow(unused_comparisons)]
30320        if __tmp.remaining() < Self::ENCODED_LEN {
30321            panic!(
30322                "buffer is too small (need {} bytes, but got {})",
30323                Self::ENCODED_LEN,
30324                __tmp.remaining(),
30325            )
30326        }
30327        __tmp.put_i32_le(self.safe_return);
30328        __tmp.put_i32_le(self.land);
30329        __tmp.put_i32_le(self.mission_next_item);
30330        __tmp.put_i32_le(self.mission_end);
30331        __tmp.put_i32_le(self.commanded_action);
30332        if matches!(version, MavlinkVersion::V2) {
30333            let len = __tmp.len();
30334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30335        } else {
30336            __tmp.len()
30337        }
30338    }
30339}
30340#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30341#[doc = ""]
30342#[doc = "ID: 333"]
30343#[derive(Debug, Clone, PartialEq)]
30344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30346#[cfg_attr(feature = "ts", derive(TS))]
30347#[cfg_attr(feature = "ts", ts(export))]
30348pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30349    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30350    pub time_usec: u64,
30351    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30353    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30354    pub pos_x: [f32; 5],
30355    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30357    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30358    pub pos_y: [f32; 5],
30359    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30360    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30361    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30362    pub pos_z: [f32; 5],
30363    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30364    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30365    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30366    pub delta: [f32; 5],
30367    #[doc = "Yaw. Set to NaN for unchanged"]
30368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30370    pub pos_yaw: [f32; 5],
30371    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30372    pub valid_points: u8,
30373}
30374impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30375    pub const ENCODED_LEN: usize = 109usize;
30376    pub const DEFAULT: Self = Self {
30377        time_usec: 0_u64,
30378        pos_x: [0.0_f32; 5usize],
30379        pos_y: [0.0_f32; 5usize],
30380        pos_z: [0.0_f32; 5usize],
30381        delta: [0.0_f32; 5usize],
30382        pos_yaw: [0.0_f32; 5usize],
30383        valid_points: 0_u8,
30384    };
30385    #[cfg(feature = "arbitrary")]
30386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30387        use arbitrary::{Arbitrary, Unstructured};
30388        let mut buf = [0u8; 1024];
30389        rng.fill_bytes(&mut buf);
30390        let mut unstructured = Unstructured::new(&buf);
30391        Self::arbitrary(&mut unstructured).unwrap_or_default()
30392    }
30393}
30394impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30395    fn default() -> Self {
30396        Self::DEFAULT.clone()
30397    }
30398}
30399impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30400    type Message = MavMessage;
30401    const ID: u32 = 333u32;
30402    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30403    const EXTRA_CRC: u8 = 231u8;
30404    const ENCODED_LEN: usize = 109usize;
30405    fn deser(
30406        _version: MavlinkVersion,
30407        __input: &[u8],
30408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30409        let avail_len = __input.len();
30410        let mut payload_buf = [0; Self::ENCODED_LEN];
30411        let mut buf = if avail_len < Self::ENCODED_LEN {
30412            payload_buf[0..avail_len].copy_from_slice(__input);
30413            Bytes::new(&payload_buf)
30414        } else {
30415            Bytes::new(__input)
30416        };
30417        let mut __struct = Self::default();
30418        __struct.time_usec = buf.get_u64_le()?;
30419        for v in &mut __struct.pos_x {
30420            let val = buf.get_f32_le()?;
30421            *v = val;
30422        }
30423        for v in &mut __struct.pos_y {
30424            let val = buf.get_f32_le()?;
30425            *v = val;
30426        }
30427        for v in &mut __struct.pos_z {
30428            let val = buf.get_f32_le()?;
30429            *v = val;
30430        }
30431        for v in &mut __struct.delta {
30432            let val = buf.get_f32_le()?;
30433            *v = val;
30434        }
30435        for v in &mut __struct.pos_yaw {
30436            let val = buf.get_f32_le()?;
30437            *v = val;
30438        }
30439        __struct.valid_points = buf.get_u8()?;
30440        Ok(__struct)
30441    }
30442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30443        let mut __tmp = BytesMut::new(bytes);
30444        #[allow(clippy::absurd_extreme_comparisons)]
30445        #[allow(unused_comparisons)]
30446        if __tmp.remaining() < Self::ENCODED_LEN {
30447            panic!(
30448                "buffer is too small (need {} bytes, but got {})",
30449                Self::ENCODED_LEN,
30450                __tmp.remaining(),
30451            )
30452        }
30453        __tmp.put_u64_le(self.time_usec);
30454        for val in &self.pos_x {
30455            __tmp.put_f32_le(*val);
30456        }
30457        for val in &self.pos_y {
30458            __tmp.put_f32_le(*val);
30459        }
30460        for val in &self.pos_z {
30461            __tmp.put_f32_le(*val);
30462        }
30463        for val in &self.delta {
30464            __tmp.put_f32_le(*val);
30465        }
30466        for val in &self.pos_yaw {
30467            __tmp.put_f32_le(*val);
30468        }
30469        __tmp.put_u8(self.valid_points);
30470        if matches!(version, MavlinkVersion::V2) {
30471            let len = __tmp.len();
30472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30473        } else {
30474            __tmp.len()
30475        }
30476    }
30477}
30478#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30479#[doc = ""]
30480#[doc = "ID: 332"]
30481#[derive(Debug, Clone, PartialEq)]
30482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30484#[cfg_attr(feature = "ts", derive(TS))]
30485#[cfg_attr(feature = "ts", ts(export))]
30486pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30487    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30488    pub time_usec: u64,
30489    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30490    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30491    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30492    pub pos_x: [f32; 5],
30493    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30494    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30495    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30496    pub pos_y: [f32; 5],
30497    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30498    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30499    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30500    pub pos_z: [f32; 5],
30501    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30503    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30504    pub vel_x: [f32; 5],
30505    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30507    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30508    pub vel_y: [f32; 5],
30509    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30511    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30512    pub vel_z: [f32; 5],
30513    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30514    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30515    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30516    pub acc_x: [f32; 5],
30517    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30518    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30519    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30520    pub acc_y: [f32; 5],
30521    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30522    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30523    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30524    pub acc_z: [f32; 5],
30525    #[doc = "Yaw angle, set to NaN if not being used"]
30526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30527    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30528    pub pos_yaw: [f32; 5],
30529    #[doc = "Yaw rate, set to NaN if not being used"]
30530    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30531    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30532    pub vel_yaw: [f32; 5],
30533    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30534    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30535    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30536    pub command: [u16; 5],
30537    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30538    pub valid_points: u8,
30539}
30540impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30541    pub const ENCODED_LEN: usize = 239usize;
30542    pub const DEFAULT: Self = Self {
30543        time_usec: 0_u64,
30544        pos_x: [0.0_f32; 5usize],
30545        pos_y: [0.0_f32; 5usize],
30546        pos_z: [0.0_f32; 5usize],
30547        vel_x: [0.0_f32; 5usize],
30548        vel_y: [0.0_f32; 5usize],
30549        vel_z: [0.0_f32; 5usize],
30550        acc_x: [0.0_f32; 5usize],
30551        acc_y: [0.0_f32; 5usize],
30552        acc_z: [0.0_f32; 5usize],
30553        pos_yaw: [0.0_f32; 5usize],
30554        vel_yaw: [0.0_f32; 5usize],
30555        command: [0_u16; 5usize],
30556        valid_points: 0_u8,
30557    };
30558    #[cfg(feature = "arbitrary")]
30559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30560        use arbitrary::{Arbitrary, Unstructured};
30561        let mut buf = [0u8; 1024];
30562        rng.fill_bytes(&mut buf);
30563        let mut unstructured = Unstructured::new(&buf);
30564        Self::arbitrary(&mut unstructured).unwrap_or_default()
30565    }
30566}
30567impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30568    fn default() -> Self {
30569        Self::DEFAULT.clone()
30570    }
30571}
30572impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30573    type Message = MavMessage;
30574    const ID: u32 = 332u32;
30575    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30576    const EXTRA_CRC: u8 = 236u8;
30577    const ENCODED_LEN: usize = 239usize;
30578    fn deser(
30579        _version: MavlinkVersion,
30580        __input: &[u8],
30581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30582        let avail_len = __input.len();
30583        let mut payload_buf = [0; Self::ENCODED_LEN];
30584        let mut buf = if avail_len < Self::ENCODED_LEN {
30585            payload_buf[0..avail_len].copy_from_slice(__input);
30586            Bytes::new(&payload_buf)
30587        } else {
30588            Bytes::new(__input)
30589        };
30590        let mut __struct = Self::default();
30591        __struct.time_usec = buf.get_u64_le()?;
30592        for v in &mut __struct.pos_x {
30593            let val = buf.get_f32_le()?;
30594            *v = val;
30595        }
30596        for v in &mut __struct.pos_y {
30597            let val = buf.get_f32_le()?;
30598            *v = val;
30599        }
30600        for v in &mut __struct.pos_z {
30601            let val = buf.get_f32_le()?;
30602            *v = val;
30603        }
30604        for v in &mut __struct.vel_x {
30605            let val = buf.get_f32_le()?;
30606            *v = val;
30607        }
30608        for v in &mut __struct.vel_y {
30609            let val = buf.get_f32_le()?;
30610            *v = val;
30611        }
30612        for v in &mut __struct.vel_z {
30613            let val = buf.get_f32_le()?;
30614            *v = val;
30615        }
30616        for v in &mut __struct.acc_x {
30617            let val = buf.get_f32_le()?;
30618            *v = val;
30619        }
30620        for v in &mut __struct.acc_y {
30621            let val = buf.get_f32_le()?;
30622            *v = val;
30623        }
30624        for v in &mut __struct.acc_z {
30625            let val = buf.get_f32_le()?;
30626            *v = val;
30627        }
30628        for v in &mut __struct.pos_yaw {
30629            let val = buf.get_f32_le()?;
30630            *v = val;
30631        }
30632        for v in &mut __struct.vel_yaw {
30633            let val = buf.get_f32_le()?;
30634            *v = val;
30635        }
30636        for v in &mut __struct.command {
30637            let val = buf.get_u16_le()?;
30638            *v = val;
30639        }
30640        __struct.valid_points = buf.get_u8()?;
30641        Ok(__struct)
30642    }
30643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30644        let mut __tmp = BytesMut::new(bytes);
30645        #[allow(clippy::absurd_extreme_comparisons)]
30646        #[allow(unused_comparisons)]
30647        if __tmp.remaining() < Self::ENCODED_LEN {
30648            panic!(
30649                "buffer is too small (need {} bytes, but got {})",
30650                Self::ENCODED_LEN,
30651                __tmp.remaining(),
30652            )
30653        }
30654        __tmp.put_u64_le(self.time_usec);
30655        for val in &self.pos_x {
30656            __tmp.put_f32_le(*val);
30657        }
30658        for val in &self.pos_y {
30659            __tmp.put_f32_le(*val);
30660        }
30661        for val in &self.pos_z {
30662            __tmp.put_f32_le(*val);
30663        }
30664        for val in &self.vel_x {
30665            __tmp.put_f32_le(*val);
30666        }
30667        for val in &self.vel_y {
30668            __tmp.put_f32_le(*val);
30669        }
30670        for val in &self.vel_z {
30671            __tmp.put_f32_le(*val);
30672        }
30673        for val in &self.acc_x {
30674            __tmp.put_f32_le(*val);
30675        }
30676        for val in &self.acc_y {
30677            __tmp.put_f32_le(*val);
30678        }
30679        for val in &self.acc_z {
30680            __tmp.put_f32_le(*val);
30681        }
30682        for val in &self.pos_yaw {
30683            __tmp.put_f32_le(*val);
30684        }
30685        for val in &self.vel_yaw {
30686            __tmp.put_f32_le(*val);
30687        }
30688        for val in &self.command {
30689            __tmp.put_u16_le(*val);
30690        }
30691        __tmp.put_u8(self.valid_points);
30692        if matches!(version, MavlinkVersion::V2) {
30693            let len = __tmp.len();
30694            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30695        } else {
30696            __tmp.len()
30697        }
30698    }
30699}
30700#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30701#[doc = ""]
30702#[doc = "ID: 385"]
30703#[derive(Debug, Clone, PartialEq)]
30704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30706#[cfg_attr(feature = "ts", derive(TS))]
30707#[cfg_attr(feature = "ts", ts(export))]
30708pub struct TUNNEL_DATA {
30709    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30710    pub payload_type: MavTunnelPayloadType,
30711    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30712    pub target_system: u8,
30713    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30714    pub target_component: u8,
30715    #[doc = "Length of the data transported in payload"]
30716    pub payload_length: u8,
30717    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30719    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30720    pub payload: [u8; 128],
30721}
30722impl TUNNEL_DATA {
30723    pub const ENCODED_LEN: usize = 133usize;
30724    pub const DEFAULT: Self = Self {
30725        payload_type: MavTunnelPayloadType::DEFAULT,
30726        target_system: 0_u8,
30727        target_component: 0_u8,
30728        payload_length: 0_u8,
30729        payload: [0_u8; 128usize],
30730    };
30731    #[cfg(feature = "arbitrary")]
30732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30733        use arbitrary::{Arbitrary, Unstructured};
30734        let mut buf = [0u8; 1024];
30735        rng.fill_bytes(&mut buf);
30736        let mut unstructured = Unstructured::new(&buf);
30737        Self::arbitrary(&mut unstructured).unwrap_or_default()
30738    }
30739}
30740impl Default for TUNNEL_DATA {
30741    fn default() -> Self {
30742        Self::DEFAULT.clone()
30743    }
30744}
30745impl MessageData for TUNNEL_DATA {
30746    type Message = MavMessage;
30747    const ID: u32 = 385u32;
30748    const NAME: &'static str = "TUNNEL";
30749    const EXTRA_CRC: u8 = 147u8;
30750    const ENCODED_LEN: usize = 133usize;
30751    fn deser(
30752        _version: MavlinkVersion,
30753        __input: &[u8],
30754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30755        let avail_len = __input.len();
30756        let mut payload_buf = [0; Self::ENCODED_LEN];
30757        let mut buf = if avail_len < Self::ENCODED_LEN {
30758            payload_buf[0..avail_len].copy_from_slice(__input);
30759            Bytes::new(&payload_buf)
30760        } else {
30761            Bytes::new(__input)
30762        };
30763        let mut __struct = Self::default();
30764        let tmp = buf.get_u16_le()?;
30765        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30766            ::mavlink_core::error::ParserError::InvalidEnum {
30767                enum_type: "MavTunnelPayloadType",
30768                value: tmp as u64,
30769            },
30770        )?;
30771        __struct.target_system = buf.get_u8()?;
30772        __struct.target_component = buf.get_u8()?;
30773        __struct.payload_length = buf.get_u8()?;
30774        for v in &mut __struct.payload {
30775            let val = buf.get_u8()?;
30776            *v = val;
30777        }
30778        Ok(__struct)
30779    }
30780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30781        let mut __tmp = BytesMut::new(bytes);
30782        #[allow(clippy::absurd_extreme_comparisons)]
30783        #[allow(unused_comparisons)]
30784        if __tmp.remaining() < Self::ENCODED_LEN {
30785            panic!(
30786                "buffer is too small (need {} bytes, but got {})",
30787                Self::ENCODED_LEN,
30788                __tmp.remaining(),
30789            )
30790        }
30791        __tmp.put_u16_le(self.payload_type as u16);
30792        __tmp.put_u8(self.target_system);
30793        __tmp.put_u8(self.target_component);
30794        __tmp.put_u8(self.payload_length);
30795        for val in &self.payload {
30796            __tmp.put_u8(*val);
30797        }
30798        if matches!(version, MavlinkVersion::V2) {
30799            let len = __tmp.len();
30800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30801        } else {
30802            __tmp.len()
30803        }
30804    }
30805}
30806#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30807#[doc = ""]
30808#[doc = "ID: 311"]
30809#[derive(Debug, Clone, PartialEq)]
30810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30812#[cfg_attr(feature = "ts", derive(TS))]
30813#[cfg_attr(feature = "ts", ts(export))]
30814pub struct UAVCAN_NODE_INFO_DATA {
30815    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30816    pub time_usec: u64,
30817    #[doc = "Time since the start-up of the node."]
30818    pub uptime_sec: u32,
30819    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30820    pub sw_vcs_commit: u32,
30821    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30822    #[cfg_attr(feature = "ts", ts(type = "string"))]
30823    pub name: CharArray<80>,
30824    #[doc = "Hardware major version number."]
30825    pub hw_version_major: u8,
30826    #[doc = "Hardware minor version number."]
30827    pub hw_version_minor: u8,
30828    #[doc = "Hardware unique 128-bit ID."]
30829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30831    pub hw_unique_id: [u8; 16],
30832    #[doc = "Software major version number."]
30833    pub sw_version_major: u8,
30834    #[doc = "Software minor version number."]
30835    pub sw_version_minor: u8,
30836}
30837impl UAVCAN_NODE_INFO_DATA {
30838    pub const ENCODED_LEN: usize = 116usize;
30839    pub const DEFAULT: Self = Self {
30840        time_usec: 0_u64,
30841        uptime_sec: 0_u32,
30842        sw_vcs_commit: 0_u32,
30843        name: CharArray::new([0_u8; 80usize]),
30844        hw_version_major: 0_u8,
30845        hw_version_minor: 0_u8,
30846        hw_unique_id: [0_u8; 16usize],
30847        sw_version_major: 0_u8,
30848        sw_version_minor: 0_u8,
30849    };
30850    #[cfg(feature = "arbitrary")]
30851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30852        use arbitrary::{Arbitrary, Unstructured};
30853        let mut buf = [0u8; 1024];
30854        rng.fill_bytes(&mut buf);
30855        let mut unstructured = Unstructured::new(&buf);
30856        Self::arbitrary(&mut unstructured).unwrap_or_default()
30857    }
30858}
30859impl Default for UAVCAN_NODE_INFO_DATA {
30860    fn default() -> Self {
30861        Self::DEFAULT.clone()
30862    }
30863}
30864impl MessageData for UAVCAN_NODE_INFO_DATA {
30865    type Message = MavMessage;
30866    const ID: u32 = 311u32;
30867    const NAME: &'static str = "UAVCAN_NODE_INFO";
30868    const EXTRA_CRC: u8 = 95u8;
30869    const ENCODED_LEN: usize = 116usize;
30870    fn deser(
30871        _version: MavlinkVersion,
30872        __input: &[u8],
30873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30874        let avail_len = __input.len();
30875        let mut payload_buf = [0; Self::ENCODED_LEN];
30876        let mut buf = if avail_len < Self::ENCODED_LEN {
30877            payload_buf[0..avail_len].copy_from_slice(__input);
30878            Bytes::new(&payload_buf)
30879        } else {
30880            Bytes::new(__input)
30881        };
30882        let mut __struct = Self::default();
30883        __struct.time_usec = buf.get_u64_le()?;
30884        __struct.uptime_sec = buf.get_u32_le()?;
30885        __struct.sw_vcs_commit = buf.get_u32_le()?;
30886        let mut tmp = [0_u8; 80usize];
30887        for v in &mut tmp {
30888            *v = buf.get_u8()?;
30889        }
30890        __struct.name = CharArray::new(tmp);
30891        __struct.hw_version_major = buf.get_u8()?;
30892        __struct.hw_version_minor = buf.get_u8()?;
30893        for v in &mut __struct.hw_unique_id {
30894            let val = buf.get_u8()?;
30895            *v = val;
30896        }
30897        __struct.sw_version_major = buf.get_u8()?;
30898        __struct.sw_version_minor = buf.get_u8()?;
30899        Ok(__struct)
30900    }
30901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30902        let mut __tmp = BytesMut::new(bytes);
30903        #[allow(clippy::absurd_extreme_comparisons)]
30904        #[allow(unused_comparisons)]
30905        if __tmp.remaining() < Self::ENCODED_LEN {
30906            panic!(
30907                "buffer is too small (need {} bytes, but got {})",
30908                Self::ENCODED_LEN,
30909                __tmp.remaining(),
30910            )
30911        }
30912        __tmp.put_u64_le(self.time_usec);
30913        __tmp.put_u32_le(self.uptime_sec);
30914        __tmp.put_u32_le(self.sw_vcs_commit);
30915        for val in &self.name {
30916            __tmp.put_u8(*val);
30917        }
30918        __tmp.put_u8(self.hw_version_major);
30919        __tmp.put_u8(self.hw_version_minor);
30920        for val in &self.hw_unique_id {
30921            __tmp.put_u8(*val);
30922        }
30923        __tmp.put_u8(self.sw_version_major);
30924        __tmp.put_u8(self.sw_version_minor);
30925        if matches!(version, MavlinkVersion::V2) {
30926            let len = __tmp.len();
30927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30928        } else {
30929            __tmp.len()
30930        }
30931    }
30932}
30933#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30934#[doc = ""]
30935#[doc = "ID: 310"]
30936#[derive(Debug, Clone, PartialEq)]
30937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30939#[cfg_attr(feature = "ts", derive(TS))]
30940#[cfg_attr(feature = "ts", ts(export))]
30941pub struct UAVCAN_NODE_STATUS_DATA {
30942    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30943    pub time_usec: u64,
30944    #[doc = "Time since the start-up of the node."]
30945    pub uptime_sec: u32,
30946    #[doc = "Vendor-specific status information."]
30947    pub vendor_specific_status_code: u16,
30948    #[doc = "Generalized node health status."]
30949    pub health: UavcanNodeHealth,
30950    #[doc = "Generalized operating mode."]
30951    pub mode: UavcanNodeMode,
30952    #[doc = "Not used currently."]
30953    pub sub_mode: u8,
30954}
30955impl UAVCAN_NODE_STATUS_DATA {
30956    pub const ENCODED_LEN: usize = 17usize;
30957    pub const DEFAULT: Self = Self {
30958        time_usec: 0_u64,
30959        uptime_sec: 0_u32,
30960        vendor_specific_status_code: 0_u16,
30961        health: UavcanNodeHealth::DEFAULT,
30962        mode: UavcanNodeMode::DEFAULT,
30963        sub_mode: 0_u8,
30964    };
30965    #[cfg(feature = "arbitrary")]
30966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30967        use arbitrary::{Arbitrary, Unstructured};
30968        let mut buf = [0u8; 1024];
30969        rng.fill_bytes(&mut buf);
30970        let mut unstructured = Unstructured::new(&buf);
30971        Self::arbitrary(&mut unstructured).unwrap_or_default()
30972    }
30973}
30974impl Default for UAVCAN_NODE_STATUS_DATA {
30975    fn default() -> Self {
30976        Self::DEFAULT.clone()
30977    }
30978}
30979impl MessageData for UAVCAN_NODE_STATUS_DATA {
30980    type Message = MavMessage;
30981    const ID: u32 = 310u32;
30982    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30983    const EXTRA_CRC: u8 = 28u8;
30984    const ENCODED_LEN: usize = 17usize;
30985    fn deser(
30986        _version: MavlinkVersion,
30987        __input: &[u8],
30988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30989        let avail_len = __input.len();
30990        let mut payload_buf = [0; Self::ENCODED_LEN];
30991        let mut buf = if avail_len < Self::ENCODED_LEN {
30992            payload_buf[0..avail_len].copy_from_slice(__input);
30993            Bytes::new(&payload_buf)
30994        } else {
30995            Bytes::new(__input)
30996        };
30997        let mut __struct = Self::default();
30998        __struct.time_usec = buf.get_u64_le()?;
30999        __struct.uptime_sec = buf.get_u32_le()?;
31000        __struct.vendor_specific_status_code = buf.get_u16_le()?;
31001        let tmp = buf.get_u8()?;
31002        __struct.health =
31003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31004                enum_type: "UavcanNodeHealth",
31005                value: tmp as u64,
31006            })?;
31007        let tmp = buf.get_u8()?;
31008        __struct.mode =
31009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31010                enum_type: "UavcanNodeMode",
31011                value: tmp as u64,
31012            })?;
31013        __struct.sub_mode = buf.get_u8()?;
31014        Ok(__struct)
31015    }
31016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31017        let mut __tmp = BytesMut::new(bytes);
31018        #[allow(clippy::absurd_extreme_comparisons)]
31019        #[allow(unused_comparisons)]
31020        if __tmp.remaining() < Self::ENCODED_LEN {
31021            panic!(
31022                "buffer is too small (need {} bytes, but got {})",
31023                Self::ENCODED_LEN,
31024                __tmp.remaining(),
31025            )
31026        }
31027        __tmp.put_u64_le(self.time_usec);
31028        __tmp.put_u32_le(self.uptime_sec);
31029        __tmp.put_u16_le(self.vendor_specific_status_code);
31030        __tmp.put_u8(self.health as u8);
31031        __tmp.put_u8(self.mode as u8);
31032        __tmp.put_u8(self.sub_mode);
31033        if matches!(version, MavlinkVersion::V2) {
31034            let len = __tmp.len();
31035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31036        } else {
31037            __tmp.len()
31038        }
31039    }
31040}
31041#[doc = "The global position resulting from GPS and sensor fusion."]
31042#[doc = ""]
31043#[doc = "ID: 340"]
31044#[derive(Debug, Clone, PartialEq)]
31045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31047#[cfg_attr(feature = "ts", derive(TS))]
31048#[cfg_attr(feature = "ts", ts(export))]
31049pub struct UTM_GLOBAL_POSITION_DATA {
31050    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31051    pub time: u64,
31052    #[doc = "Latitude (WGS84)"]
31053    pub lat: i32,
31054    #[doc = "Longitude (WGS84)"]
31055    pub lon: i32,
31056    #[doc = "Altitude (WGS84)"]
31057    pub alt: i32,
31058    #[doc = "Altitude above ground"]
31059    pub relative_alt: i32,
31060    #[doc = "Next waypoint, latitude (WGS84)"]
31061    pub next_lat: i32,
31062    #[doc = "Next waypoint, longitude (WGS84)"]
31063    pub next_lon: i32,
31064    #[doc = "Next waypoint, altitude (WGS84)"]
31065    pub next_alt: i32,
31066    #[doc = "Ground X speed (latitude, positive north)"]
31067    pub vx: i16,
31068    #[doc = "Ground Y speed (longitude, positive east)"]
31069    pub vy: i16,
31070    #[doc = "Ground Z speed (altitude, positive down)"]
31071    pub vz: i16,
31072    #[doc = "Horizontal position uncertainty (standard deviation)"]
31073    pub h_acc: u16,
31074    #[doc = "Altitude uncertainty (standard deviation)"]
31075    pub v_acc: u16,
31076    #[doc = "Speed uncertainty (standard deviation)"]
31077    pub vel_acc: u16,
31078    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31079    pub update_rate: u16,
31080    #[doc = "Unique UAS ID."]
31081    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31082    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31083    pub uas_id: [u8; 18],
31084    #[doc = "Flight state"]
31085    pub flight_state: UtmFlightState,
31086    #[doc = "Bitwise OR combination of the data available flags."]
31087    pub flags: UtmDataAvailFlags,
31088}
31089impl UTM_GLOBAL_POSITION_DATA {
31090    pub const ENCODED_LEN: usize = 70usize;
31091    pub const DEFAULT: Self = Self {
31092        time: 0_u64,
31093        lat: 0_i32,
31094        lon: 0_i32,
31095        alt: 0_i32,
31096        relative_alt: 0_i32,
31097        next_lat: 0_i32,
31098        next_lon: 0_i32,
31099        next_alt: 0_i32,
31100        vx: 0_i16,
31101        vy: 0_i16,
31102        vz: 0_i16,
31103        h_acc: 0_u16,
31104        v_acc: 0_u16,
31105        vel_acc: 0_u16,
31106        update_rate: 0_u16,
31107        uas_id: [0_u8; 18usize],
31108        flight_state: UtmFlightState::DEFAULT,
31109        flags: UtmDataAvailFlags::DEFAULT,
31110    };
31111    #[cfg(feature = "arbitrary")]
31112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31113        use arbitrary::{Arbitrary, Unstructured};
31114        let mut buf = [0u8; 1024];
31115        rng.fill_bytes(&mut buf);
31116        let mut unstructured = Unstructured::new(&buf);
31117        Self::arbitrary(&mut unstructured).unwrap_or_default()
31118    }
31119}
31120impl Default for UTM_GLOBAL_POSITION_DATA {
31121    fn default() -> Self {
31122        Self::DEFAULT.clone()
31123    }
31124}
31125impl MessageData for UTM_GLOBAL_POSITION_DATA {
31126    type Message = MavMessage;
31127    const ID: u32 = 340u32;
31128    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31129    const EXTRA_CRC: u8 = 99u8;
31130    const ENCODED_LEN: usize = 70usize;
31131    fn deser(
31132        _version: MavlinkVersion,
31133        __input: &[u8],
31134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31135        let avail_len = __input.len();
31136        let mut payload_buf = [0; Self::ENCODED_LEN];
31137        let mut buf = if avail_len < Self::ENCODED_LEN {
31138            payload_buf[0..avail_len].copy_from_slice(__input);
31139            Bytes::new(&payload_buf)
31140        } else {
31141            Bytes::new(__input)
31142        };
31143        let mut __struct = Self::default();
31144        __struct.time = buf.get_u64_le()?;
31145        __struct.lat = buf.get_i32_le()?;
31146        __struct.lon = buf.get_i32_le()?;
31147        __struct.alt = buf.get_i32_le()?;
31148        __struct.relative_alt = buf.get_i32_le()?;
31149        __struct.next_lat = buf.get_i32_le()?;
31150        __struct.next_lon = buf.get_i32_le()?;
31151        __struct.next_alt = buf.get_i32_le()?;
31152        __struct.vx = buf.get_i16_le()?;
31153        __struct.vy = buf.get_i16_le()?;
31154        __struct.vz = buf.get_i16_le()?;
31155        __struct.h_acc = buf.get_u16_le()?;
31156        __struct.v_acc = buf.get_u16_le()?;
31157        __struct.vel_acc = buf.get_u16_le()?;
31158        __struct.update_rate = buf.get_u16_le()?;
31159        for v in &mut __struct.uas_id {
31160            let val = buf.get_u8()?;
31161            *v = val;
31162        }
31163        let tmp = buf.get_u8()?;
31164        __struct.flight_state =
31165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31166                enum_type: "UtmFlightState",
31167                value: tmp as u64,
31168            })?;
31169        let tmp = buf.get_u8()?;
31170        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31171            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31172                flag_type: "UtmDataAvailFlags",
31173                value: tmp as u64,
31174            })?;
31175        Ok(__struct)
31176    }
31177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31178        let mut __tmp = BytesMut::new(bytes);
31179        #[allow(clippy::absurd_extreme_comparisons)]
31180        #[allow(unused_comparisons)]
31181        if __tmp.remaining() < Self::ENCODED_LEN {
31182            panic!(
31183                "buffer is too small (need {} bytes, but got {})",
31184                Self::ENCODED_LEN,
31185                __tmp.remaining(),
31186            )
31187        }
31188        __tmp.put_u64_le(self.time);
31189        __tmp.put_i32_le(self.lat);
31190        __tmp.put_i32_le(self.lon);
31191        __tmp.put_i32_le(self.alt);
31192        __tmp.put_i32_le(self.relative_alt);
31193        __tmp.put_i32_le(self.next_lat);
31194        __tmp.put_i32_le(self.next_lon);
31195        __tmp.put_i32_le(self.next_alt);
31196        __tmp.put_i16_le(self.vx);
31197        __tmp.put_i16_le(self.vy);
31198        __tmp.put_i16_le(self.vz);
31199        __tmp.put_u16_le(self.h_acc);
31200        __tmp.put_u16_le(self.v_acc);
31201        __tmp.put_u16_le(self.vel_acc);
31202        __tmp.put_u16_le(self.update_rate);
31203        for val in &self.uas_id {
31204            __tmp.put_u8(*val);
31205        }
31206        __tmp.put_u8(self.flight_state as u8);
31207        __tmp.put_u8(self.flags.bits() as u8);
31208        if matches!(version, MavlinkVersion::V2) {
31209            let len = __tmp.len();
31210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31211        } else {
31212            __tmp.len()
31213        }
31214    }
31215}
31216#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31217#[doc = ""]
31218#[doc = "ID: 248"]
31219#[derive(Debug, Clone, PartialEq)]
31220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31222#[cfg_attr(feature = "ts", derive(TS))]
31223#[cfg_attr(feature = "ts", ts(export))]
31224pub struct V2_EXTENSION_DATA {
31225    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31226    pub message_type: u16,
31227    #[doc = "Network ID (0 for broadcast)"]
31228    pub target_network: u8,
31229    #[doc = "System ID (0 for broadcast)"]
31230    pub target_system: u8,
31231    #[doc = "Component ID (0 for broadcast)"]
31232    pub target_component: u8,
31233    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31235    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31236    pub payload: [u8; 249],
31237}
31238impl V2_EXTENSION_DATA {
31239    pub const ENCODED_LEN: usize = 254usize;
31240    pub const DEFAULT: Self = Self {
31241        message_type: 0_u16,
31242        target_network: 0_u8,
31243        target_system: 0_u8,
31244        target_component: 0_u8,
31245        payload: [0_u8; 249usize],
31246    };
31247    #[cfg(feature = "arbitrary")]
31248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31249        use arbitrary::{Arbitrary, Unstructured};
31250        let mut buf = [0u8; 1024];
31251        rng.fill_bytes(&mut buf);
31252        let mut unstructured = Unstructured::new(&buf);
31253        Self::arbitrary(&mut unstructured).unwrap_or_default()
31254    }
31255}
31256impl Default for V2_EXTENSION_DATA {
31257    fn default() -> Self {
31258        Self::DEFAULT.clone()
31259    }
31260}
31261impl MessageData for V2_EXTENSION_DATA {
31262    type Message = MavMessage;
31263    const ID: u32 = 248u32;
31264    const NAME: &'static str = "V2_EXTENSION";
31265    const EXTRA_CRC: u8 = 8u8;
31266    const ENCODED_LEN: usize = 254usize;
31267    fn deser(
31268        _version: MavlinkVersion,
31269        __input: &[u8],
31270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31271        let avail_len = __input.len();
31272        let mut payload_buf = [0; Self::ENCODED_LEN];
31273        let mut buf = if avail_len < Self::ENCODED_LEN {
31274            payload_buf[0..avail_len].copy_from_slice(__input);
31275            Bytes::new(&payload_buf)
31276        } else {
31277            Bytes::new(__input)
31278        };
31279        let mut __struct = Self::default();
31280        __struct.message_type = buf.get_u16_le()?;
31281        __struct.target_network = buf.get_u8()?;
31282        __struct.target_system = buf.get_u8()?;
31283        __struct.target_component = buf.get_u8()?;
31284        for v in &mut __struct.payload {
31285            let val = buf.get_u8()?;
31286            *v = val;
31287        }
31288        Ok(__struct)
31289    }
31290    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31291        let mut __tmp = BytesMut::new(bytes);
31292        #[allow(clippy::absurd_extreme_comparisons)]
31293        #[allow(unused_comparisons)]
31294        if __tmp.remaining() < Self::ENCODED_LEN {
31295            panic!(
31296                "buffer is too small (need {} bytes, but got {})",
31297                Self::ENCODED_LEN,
31298                __tmp.remaining(),
31299            )
31300        }
31301        __tmp.put_u16_le(self.message_type);
31302        __tmp.put_u8(self.target_network);
31303        __tmp.put_u8(self.target_system);
31304        __tmp.put_u8(self.target_component);
31305        for val in &self.payload {
31306            __tmp.put_u8(*val);
31307        }
31308        if matches!(version, MavlinkVersion::V2) {
31309            let len = __tmp.len();
31310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31311        } else {
31312            __tmp.len()
31313        }
31314    }
31315}
31316#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31317#[doc = ""]
31318#[doc = "ID: 74"]
31319#[derive(Debug, Clone, PartialEq)]
31320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31322#[cfg_attr(feature = "ts", derive(TS))]
31323#[cfg_attr(feature = "ts", ts(export))]
31324pub struct VFR_HUD_DATA {
31325    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31326    pub airspeed: f32,
31327    #[doc = "Current ground speed."]
31328    pub groundspeed: f32,
31329    #[doc = "Current altitude (MSL)."]
31330    pub alt: f32,
31331    #[doc = "Current climb rate."]
31332    pub climb: f32,
31333    #[doc = "Current heading in compass units (0-360, 0=north)."]
31334    pub heading: i16,
31335    #[doc = "Current throttle setting (0 to 100)."]
31336    pub throttle: u16,
31337}
31338impl VFR_HUD_DATA {
31339    pub const ENCODED_LEN: usize = 20usize;
31340    pub const DEFAULT: Self = Self {
31341        airspeed: 0.0_f32,
31342        groundspeed: 0.0_f32,
31343        alt: 0.0_f32,
31344        climb: 0.0_f32,
31345        heading: 0_i16,
31346        throttle: 0_u16,
31347    };
31348    #[cfg(feature = "arbitrary")]
31349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31350        use arbitrary::{Arbitrary, Unstructured};
31351        let mut buf = [0u8; 1024];
31352        rng.fill_bytes(&mut buf);
31353        let mut unstructured = Unstructured::new(&buf);
31354        Self::arbitrary(&mut unstructured).unwrap_or_default()
31355    }
31356}
31357impl Default for VFR_HUD_DATA {
31358    fn default() -> Self {
31359        Self::DEFAULT.clone()
31360    }
31361}
31362impl MessageData for VFR_HUD_DATA {
31363    type Message = MavMessage;
31364    const ID: u32 = 74u32;
31365    const NAME: &'static str = "VFR_HUD";
31366    const EXTRA_CRC: u8 = 20u8;
31367    const ENCODED_LEN: usize = 20usize;
31368    fn deser(
31369        _version: MavlinkVersion,
31370        __input: &[u8],
31371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31372        let avail_len = __input.len();
31373        let mut payload_buf = [0; Self::ENCODED_LEN];
31374        let mut buf = if avail_len < Self::ENCODED_LEN {
31375            payload_buf[0..avail_len].copy_from_slice(__input);
31376            Bytes::new(&payload_buf)
31377        } else {
31378            Bytes::new(__input)
31379        };
31380        let mut __struct = Self::default();
31381        __struct.airspeed = buf.get_f32_le()?;
31382        __struct.groundspeed = buf.get_f32_le()?;
31383        __struct.alt = buf.get_f32_le()?;
31384        __struct.climb = buf.get_f32_le()?;
31385        __struct.heading = buf.get_i16_le()?;
31386        __struct.throttle = buf.get_u16_le()?;
31387        Ok(__struct)
31388    }
31389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31390        let mut __tmp = BytesMut::new(bytes);
31391        #[allow(clippy::absurd_extreme_comparisons)]
31392        #[allow(unused_comparisons)]
31393        if __tmp.remaining() < Self::ENCODED_LEN {
31394            panic!(
31395                "buffer is too small (need {} bytes, but got {})",
31396                Self::ENCODED_LEN,
31397                __tmp.remaining(),
31398            )
31399        }
31400        __tmp.put_f32_le(self.airspeed);
31401        __tmp.put_f32_le(self.groundspeed);
31402        __tmp.put_f32_le(self.alt);
31403        __tmp.put_f32_le(self.climb);
31404        __tmp.put_i16_le(self.heading);
31405        __tmp.put_u16_le(self.throttle);
31406        if matches!(version, MavlinkVersion::V2) {
31407            let len = __tmp.len();
31408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31409        } else {
31410            __tmp.len()
31411        }
31412    }
31413}
31414#[doc = "Vibration levels and accelerometer clipping."]
31415#[doc = ""]
31416#[doc = "ID: 241"]
31417#[derive(Debug, Clone, PartialEq)]
31418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31420#[cfg_attr(feature = "ts", derive(TS))]
31421#[cfg_attr(feature = "ts", ts(export))]
31422pub struct VIBRATION_DATA {
31423    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31424    pub time_usec: u64,
31425    #[doc = "Vibration levels on X-axis"]
31426    pub vibration_x: f32,
31427    #[doc = "Vibration levels on Y-axis"]
31428    pub vibration_y: f32,
31429    #[doc = "Vibration levels on Z-axis"]
31430    pub vibration_z: f32,
31431    #[doc = "first accelerometer clipping count"]
31432    pub clipping_0: u32,
31433    #[doc = "second accelerometer clipping count"]
31434    pub clipping_1: u32,
31435    #[doc = "third accelerometer clipping count"]
31436    pub clipping_2: u32,
31437}
31438impl VIBRATION_DATA {
31439    pub const ENCODED_LEN: usize = 32usize;
31440    pub const DEFAULT: Self = Self {
31441        time_usec: 0_u64,
31442        vibration_x: 0.0_f32,
31443        vibration_y: 0.0_f32,
31444        vibration_z: 0.0_f32,
31445        clipping_0: 0_u32,
31446        clipping_1: 0_u32,
31447        clipping_2: 0_u32,
31448    };
31449    #[cfg(feature = "arbitrary")]
31450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31451        use arbitrary::{Arbitrary, Unstructured};
31452        let mut buf = [0u8; 1024];
31453        rng.fill_bytes(&mut buf);
31454        let mut unstructured = Unstructured::new(&buf);
31455        Self::arbitrary(&mut unstructured).unwrap_or_default()
31456    }
31457}
31458impl Default for VIBRATION_DATA {
31459    fn default() -> Self {
31460        Self::DEFAULT.clone()
31461    }
31462}
31463impl MessageData for VIBRATION_DATA {
31464    type Message = MavMessage;
31465    const ID: u32 = 241u32;
31466    const NAME: &'static str = "VIBRATION";
31467    const EXTRA_CRC: u8 = 90u8;
31468    const ENCODED_LEN: usize = 32usize;
31469    fn deser(
31470        _version: MavlinkVersion,
31471        __input: &[u8],
31472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31473        let avail_len = __input.len();
31474        let mut payload_buf = [0; Self::ENCODED_LEN];
31475        let mut buf = if avail_len < Self::ENCODED_LEN {
31476            payload_buf[0..avail_len].copy_from_slice(__input);
31477            Bytes::new(&payload_buf)
31478        } else {
31479            Bytes::new(__input)
31480        };
31481        let mut __struct = Self::default();
31482        __struct.time_usec = buf.get_u64_le()?;
31483        __struct.vibration_x = buf.get_f32_le()?;
31484        __struct.vibration_y = buf.get_f32_le()?;
31485        __struct.vibration_z = buf.get_f32_le()?;
31486        __struct.clipping_0 = buf.get_u32_le()?;
31487        __struct.clipping_1 = buf.get_u32_le()?;
31488        __struct.clipping_2 = buf.get_u32_le()?;
31489        Ok(__struct)
31490    }
31491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31492        let mut __tmp = BytesMut::new(bytes);
31493        #[allow(clippy::absurd_extreme_comparisons)]
31494        #[allow(unused_comparisons)]
31495        if __tmp.remaining() < Self::ENCODED_LEN {
31496            panic!(
31497                "buffer is too small (need {} bytes, but got {})",
31498                Self::ENCODED_LEN,
31499                __tmp.remaining(),
31500            )
31501        }
31502        __tmp.put_u64_le(self.time_usec);
31503        __tmp.put_f32_le(self.vibration_x);
31504        __tmp.put_f32_le(self.vibration_y);
31505        __tmp.put_f32_le(self.vibration_z);
31506        __tmp.put_u32_le(self.clipping_0);
31507        __tmp.put_u32_le(self.clipping_1);
31508        __tmp.put_u32_le(self.clipping_2);
31509        if matches!(version, MavlinkVersion::V2) {
31510            let len = __tmp.len();
31511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31512        } else {
31513            __tmp.len()
31514        }
31515    }
31516}
31517#[doc = "Global position estimate from a Vicon motion system source."]
31518#[doc = ""]
31519#[doc = "ID: 104"]
31520#[derive(Debug, Clone, PartialEq)]
31521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31523#[cfg_attr(feature = "ts", derive(TS))]
31524#[cfg_attr(feature = "ts", ts(export))]
31525pub struct VICON_POSITION_ESTIMATE_DATA {
31526    #[doc = "Timestamp (UNIX time or time since system boot)"]
31527    pub usec: u64,
31528    #[doc = "Global X position"]
31529    pub x: f32,
31530    #[doc = "Global Y position"]
31531    pub y: f32,
31532    #[doc = "Global Z position"]
31533    pub z: f32,
31534    #[doc = "Roll angle"]
31535    pub roll: f32,
31536    #[doc = "Pitch angle"]
31537    pub pitch: f32,
31538    #[doc = "Yaw angle"]
31539    pub yaw: f32,
31540    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31543    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31544    pub covariance: [f32; 21],
31545}
31546impl VICON_POSITION_ESTIMATE_DATA {
31547    pub const ENCODED_LEN: usize = 116usize;
31548    pub const DEFAULT: Self = Self {
31549        usec: 0_u64,
31550        x: 0.0_f32,
31551        y: 0.0_f32,
31552        z: 0.0_f32,
31553        roll: 0.0_f32,
31554        pitch: 0.0_f32,
31555        yaw: 0.0_f32,
31556        covariance: [0.0_f32; 21usize],
31557    };
31558    #[cfg(feature = "arbitrary")]
31559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31560        use arbitrary::{Arbitrary, Unstructured};
31561        let mut buf = [0u8; 1024];
31562        rng.fill_bytes(&mut buf);
31563        let mut unstructured = Unstructured::new(&buf);
31564        Self::arbitrary(&mut unstructured).unwrap_or_default()
31565    }
31566}
31567impl Default for VICON_POSITION_ESTIMATE_DATA {
31568    fn default() -> Self {
31569        Self::DEFAULT.clone()
31570    }
31571}
31572impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31573    type Message = MavMessage;
31574    const ID: u32 = 104u32;
31575    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31576    const EXTRA_CRC: u8 = 56u8;
31577    const ENCODED_LEN: usize = 116usize;
31578    fn deser(
31579        _version: MavlinkVersion,
31580        __input: &[u8],
31581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31582        let avail_len = __input.len();
31583        let mut payload_buf = [0; Self::ENCODED_LEN];
31584        let mut buf = if avail_len < Self::ENCODED_LEN {
31585            payload_buf[0..avail_len].copy_from_slice(__input);
31586            Bytes::new(&payload_buf)
31587        } else {
31588            Bytes::new(__input)
31589        };
31590        let mut __struct = Self::default();
31591        __struct.usec = buf.get_u64_le()?;
31592        __struct.x = buf.get_f32_le()?;
31593        __struct.y = buf.get_f32_le()?;
31594        __struct.z = buf.get_f32_le()?;
31595        __struct.roll = buf.get_f32_le()?;
31596        __struct.pitch = buf.get_f32_le()?;
31597        __struct.yaw = buf.get_f32_le()?;
31598        for v in &mut __struct.covariance {
31599            let val = buf.get_f32_le()?;
31600            *v = val;
31601        }
31602        Ok(__struct)
31603    }
31604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31605        let mut __tmp = BytesMut::new(bytes);
31606        #[allow(clippy::absurd_extreme_comparisons)]
31607        #[allow(unused_comparisons)]
31608        if __tmp.remaining() < Self::ENCODED_LEN {
31609            panic!(
31610                "buffer is too small (need {} bytes, but got {})",
31611                Self::ENCODED_LEN,
31612                __tmp.remaining(),
31613            )
31614        }
31615        __tmp.put_u64_le(self.usec);
31616        __tmp.put_f32_le(self.x);
31617        __tmp.put_f32_le(self.y);
31618        __tmp.put_f32_le(self.z);
31619        __tmp.put_f32_le(self.roll);
31620        __tmp.put_f32_le(self.pitch);
31621        __tmp.put_f32_le(self.yaw);
31622        if matches!(version, MavlinkVersion::V2) {
31623            for val in &self.covariance {
31624                __tmp.put_f32_le(*val);
31625            }
31626            let len = __tmp.len();
31627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31628        } else {
31629            __tmp.len()
31630        }
31631    }
31632}
31633#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31634#[doc = ""]
31635#[doc = "ID: 269"]
31636#[derive(Debug, Clone, PartialEq)]
31637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31639#[cfg_attr(feature = "ts", derive(TS))]
31640#[cfg_attr(feature = "ts", ts(export))]
31641pub struct VIDEO_STREAM_INFORMATION_DATA {
31642    #[doc = "Frame rate."]
31643    pub framerate: f32,
31644    #[doc = "Bit rate."]
31645    pub bitrate: u32,
31646    #[doc = "Bitmap of stream status flags."]
31647    pub flags: VideoStreamStatusFlags,
31648    #[doc = "Horizontal resolution."]
31649    pub resolution_h: u16,
31650    #[doc = "Vertical resolution."]
31651    pub resolution_v: u16,
31652    #[doc = "Video image rotation clockwise."]
31653    pub rotation: u16,
31654    #[doc = "Horizontal Field of view."]
31655    pub hfov: u16,
31656    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31657    pub stream_id: u8,
31658    #[doc = "Number of streams available."]
31659    pub count: u8,
31660    #[doc = "Type of stream."]
31661    pub mavtype: VideoStreamType,
31662    #[doc = "Stream name."]
31663    #[cfg_attr(feature = "ts", ts(type = "string"))]
31664    pub name: CharArray<32>,
31665    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31666    #[cfg_attr(feature = "ts", ts(type = "string"))]
31667    pub uri: CharArray<160>,
31668    #[doc = "Encoding of stream."]
31669    #[cfg_attr(feature = "serde", serde(default))]
31670    pub encoding: VideoStreamEncoding,
31671    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31672    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31673    pub camera_device_id: u8,
31674}
31675impl VIDEO_STREAM_INFORMATION_DATA {
31676    pub const ENCODED_LEN: usize = 215usize;
31677    pub const DEFAULT: Self = Self {
31678        framerate: 0.0_f32,
31679        bitrate: 0_u32,
31680        flags: VideoStreamStatusFlags::DEFAULT,
31681        resolution_h: 0_u16,
31682        resolution_v: 0_u16,
31683        rotation: 0_u16,
31684        hfov: 0_u16,
31685        stream_id: 0_u8,
31686        count: 0_u8,
31687        mavtype: VideoStreamType::DEFAULT,
31688        name: CharArray::new([0_u8; 32usize]),
31689        uri: CharArray::new([0_u8; 160usize]),
31690        encoding: VideoStreamEncoding::DEFAULT,
31691        camera_device_id: 0_u8,
31692    };
31693    #[cfg(feature = "arbitrary")]
31694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31695        use arbitrary::{Arbitrary, Unstructured};
31696        let mut buf = [0u8; 1024];
31697        rng.fill_bytes(&mut buf);
31698        let mut unstructured = Unstructured::new(&buf);
31699        Self::arbitrary(&mut unstructured).unwrap_or_default()
31700    }
31701}
31702impl Default for VIDEO_STREAM_INFORMATION_DATA {
31703    fn default() -> Self {
31704        Self::DEFAULT.clone()
31705    }
31706}
31707impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31708    type Message = MavMessage;
31709    const ID: u32 = 269u32;
31710    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31711    const EXTRA_CRC: u8 = 109u8;
31712    const ENCODED_LEN: usize = 215usize;
31713    fn deser(
31714        _version: MavlinkVersion,
31715        __input: &[u8],
31716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31717        let avail_len = __input.len();
31718        let mut payload_buf = [0; Self::ENCODED_LEN];
31719        let mut buf = if avail_len < Self::ENCODED_LEN {
31720            payload_buf[0..avail_len].copy_from_slice(__input);
31721            Bytes::new(&payload_buf)
31722        } else {
31723            Bytes::new(__input)
31724        };
31725        let mut __struct = Self::default();
31726        __struct.framerate = buf.get_f32_le()?;
31727        __struct.bitrate = buf.get_u32_le()?;
31728        let tmp = buf.get_u16_le()?;
31729        __struct.flags =
31730            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31731                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31732                    flag_type: "VideoStreamStatusFlags",
31733                    value: tmp as u64,
31734                })?;
31735        __struct.resolution_h = buf.get_u16_le()?;
31736        __struct.resolution_v = buf.get_u16_le()?;
31737        __struct.rotation = buf.get_u16_le()?;
31738        __struct.hfov = buf.get_u16_le()?;
31739        __struct.stream_id = buf.get_u8()?;
31740        __struct.count = buf.get_u8()?;
31741        let tmp = buf.get_u8()?;
31742        __struct.mavtype =
31743            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31744                enum_type: "VideoStreamType",
31745                value: tmp as u64,
31746            })?;
31747        let mut tmp = [0_u8; 32usize];
31748        for v in &mut tmp {
31749            *v = buf.get_u8()?;
31750        }
31751        __struct.name = CharArray::new(tmp);
31752        let mut tmp = [0_u8; 160usize];
31753        for v in &mut tmp {
31754            *v = buf.get_u8()?;
31755        }
31756        __struct.uri = CharArray::new(tmp);
31757        let tmp = buf.get_u8()?;
31758        __struct.encoding =
31759            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31760                enum_type: "VideoStreamEncoding",
31761                value: tmp as u64,
31762            })?;
31763        __struct.camera_device_id = buf.get_u8()?;
31764        Ok(__struct)
31765    }
31766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31767        let mut __tmp = BytesMut::new(bytes);
31768        #[allow(clippy::absurd_extreme_comparisons)]
31769        #[allow(unused_comparisons)]
31770        if __tmp.remaining() < Self::ENCODED_LEN {
31771            panic!(
31772                "buffer is too small (need {} bytes, but got {})",
31773                Self::ENCODED_LEN,
31774                __tmp.remaining(),
31775            )
31776        }
31777        __tmp.put_f32_le(self.framerate);
31778        __tmp.put_u32_le(self.bitrate);
31779        __tmp.put_u16_le(self.flags.bits() as u16);
31780        __tmp.put_u16_le(self.resolution_h);
31781        __tmp.put_u16_le(self.resolution_v);
31782        __tmp.put_u16_le(self.rotation);
31783        __tmp.put_u16_le(self.hfov);
31784        __tmp.put_u8(self.stream_id);
31785        __tmp.put_u8(self.count);
31786        __tmp.put_u8(self.mavtype as u8);
31787        for val in &self.name {
31788            __tmp.put_u8(*val);
31789        }
31790        for val in &self.uri {
31791            __tmp.put_u8(*val);
31792        }
31793        if matches!(version, MavlinkVersion::V2) {
31794            __tmp.put_u8(self.encoding as u8);
31795            __tmp.put_u8(self.camera_device_id);
31796            let len = __tmp.len();
31797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31798        } else {
31799            __tmp.len()
31800        }
31801    }
31802}
31803#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31804#[doc = ""]
31805#[doc = "ID: 270"]
31806#[derive(Debug, Clone, PartialEq)]
31807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31809#[cfg_attr(feature = "ts", derive(TS))]
31810#[cfg_attr(feature = "ts", ts(export))]
31811pub struct VIDEO_STREAM_STATUS_DATA {
31812    #[doc = "Frame rate"]
31813    pub framerate: f32,
31814    #[doc = "Bit rate"]
31815    pub bitrate: u32,
31816    #[doc = "Bitmap of stream status flags"]
31817    pub flags: VideoStreamStatusFlags,
31818    #[doc = "Horizontal resolution"]
31819    pub resolution_h: u16,
31820    #[doc = "Vertical resolution"]
31821    pub resolution_v: u16,
31822    #[doc = "Video image rotation clockwise"]
31823    pub rotation: u16,
31824    #[doc = "Horizontal Field of view"]
31825    pub hfov: u16,
31826    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31827    pub stream_id: u8,
31828    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31830    pub camera_device_id: u8,
31831}
31832impl VIDEO_STREAM_STATUS_DATA {
31833    pub const ENCODED_LEN: usize = 20usize;
31834    pub const DEFAULT: Self = Self {
31835        framerate: 0.0_f32,
31836        bitrate: 0_u32,
31837        flags: VideoStreamStatusFlags::DEFAULT,
31838        resolution_h: 0_u16,
31839        resolution_v: 0_u16,
31840        rotation: 0_u16,
31841        hfov: 0_u16,
31842        stream_id: 0_u8,
31843        camera_device_id: 0_u8,
31844    };
31845    #[cfg(feature = "arbitrary")]
31846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31847        use arbitrary::{Arbitrary, Unstructured};
31848        let mut buf = [0u8; 1024];
31849        rng.fill_bytes(&mut buf);
31850        let mut unstructured = Unstructured::new(&buf);
31851        Self::arbitrary(&mut unstructured).unwrap_or_default()
31852    }
31853}
31854impl Default for VIDEO_STREAM_STATUS_DATA {
31855    fn default() -> Self {
31856        Self::DEFAULT.clone()
31857    }
31858}
31859impl MessageData for VIDEO_STREAM_STATUS_DATA {
31860    type Message = MavMessage;
31861    const ID: u32 = 270u32;
31862    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31863    const EXTRA_CRC: u8 = 59u8;
31864    const ENCODED_LEN: usize = 20usize;
31865    fn deser(
31866        _version: MavlinkVersion,
31867        __input: &[u8],
31868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31869        let avail_len = __input.len();
31870        let mut payload_buf = [0; Self::ENCODED_LEN];
31871        let mut buf = if avail_len < Self::ENCODED_LEN {
31872            payload_buf[0..avail_len].copy_from_slice(__input);
31873            Bytes::new(&payload_buf)
31874        } else {
31875            Bytes::new(__input)
31876        };
31877        let mut __struct = Self::default();
31878        __struct.framerate = buf.get_f32_le()?;
31879        __struct.bitrate = buf.get_u32_le()?;
31880        let tmp = buf.get_u16_le()?;
31881        __struct.flags =
31882            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31883                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31884                    flag_type: "VideoStreamStatusFlags",
31885                    value: tmp as u64,
31886                })?;
31887        __struct.resolution_h = buf.get_u16_le()?;
31888        __struct.resolution_v = buf.get_u16_le()?;
31889        __struct.rotation = buf.get_u16_le()?;
31890        __struct.hfov = buf.get_u16_le()?;
31891        __struct.stream_id = buf.get_u8()?;
31892        __struct.camera_device_id = buf.get_u8()?;
31893        Ok(__struct)
31894    }
31895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31896        let mut __tmp = BytesMut::new(bytes);
31897        #[allow(clippy::absurd_extreme_comparisons)]
31898        #[allow(unused_comparisons)]
31899        if __tmp.remaining() < Self::ENCODED_LEN {
31900            panic!(
31901                "buffer is too small (need {} bytes, but got {})",
31902                Self::ENCODED_LEN,
31903                __tmp.remaining(),
31904            )
31905        }
31906        __tmp.put_f32_le(self.framerate);
31907        __tmp.put_u32_le(self.bitrate);
31908        __tmp.put_u16_le(self.flags.bits() as u16);
31909        __tmp.put_u16_le(self.resolution_h);
31910        __tmp.put_u16_le(self.resolution_v);
31911        __tmp.put_u16_le(self.rotation);
31912        __tmp.put_u16_le(self.hfov);
31913        __tmp.put_u8(self.stream_id);
31914        if matches!(version, MavlinkVersion::V2) {
31915            __tmp.put_u8(self.camera_device_id);
31916            let len = __tmp.len();
31917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31918        } else {
31919            __tmp.len()
31920        }
31921    }
31922}
31923#[doc = "Local position/attitude estimate from a vision source."]
31924#[doc = ""]
31925#[doc = "ID: 102"]
31926#[derive(Debug, Clone, PartialEq)]
31927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31929#[cfg_attr(feature = "ts", derive(TS))]
31930#[cfg_attr(feature = "ts", ts(export))]
31931pub struct VISION_POSITION_ESTIMATE_DATA {
31932    #[doc = "Timestamp (UNIX time or time since system boot)"]
31933    pub usec: u64,
31934    #[doc = "Local X position"]
31935    pub x: f32,
31936    #[doc = "Local Y position"]
31937    pub y: f32,
31938    #[doc = "Local Z position"]
31939    pub z: f32,
31940    #[doc = "Roll angle"]
31941    pub roll: f32,
31942    #[doc = "Pitch angle"]
31943    pub pitch: f32,
31944    #[doc = "Yaw angle"]
31945    pub yaw: f32,
31946    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31950    pub covariance: [f32; 21],
31951    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31952    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31953    pub reset_counter: u8,
31954}
31955impl VISION_POSITION_ESTIMATE_DATA {
31956    pub const ENCODED_LEN: usize = 117usize;
31957    pub const DEFAULT: Self = Self {
31958        usec: 0_u64,
31959        x: 0.0_f32,
31960        y: 0.0_f32,
31961        z: 0.0_f32,
31962        roll: 0.0_f32,
31963        pitch: 0.0_f32,
31964        yaw: 0.0_f32,
31965        covariance: [0.0_f32; 21usize],
31966        reset_counter: 0_u8,
31967    };
31968    #[cfg(feature = "arbitrary")]
31969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31970        use arbitrary::{Arbitrary, Unstructured};
31971        let mut buf = [0u8; 1024];
31972        rng.fill_bytes(&mut buf);
31973        let mut unstructured = Unstructured::new(&buf);
31974        Self::arbitrary(&mut unstructured).unwrap_or_default()
31975    }
31976}
31977impl Default for VISION_POSITION_ESTIMATE_DATA {
31978    fn default() -> Self {
31979        Self::DEFAULT.clone()
31980    }
31981}
31982impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31983    type Message = MavMessage;
31984    const ID: u32 = 102u32;
31985    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31986    const EXTRA_CRC: u8 = 158u8;
31987    const ENCODED_LEN: usize = 117usize;
31988    fn deser(
31989        _version: MavlinkVersion,
31990        __input: &[u8],
31991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31992        let avail_len = __input.len();
31993        let mut payload_buf = [0; Self::ENCODED_LEN];
31994        let mut buf = if avail_len < Self::ENCODED_LEN {
31995            payload_buf[0..avail_len].copy_from_slice(__input);
31996            Bytes::new(&payload_buf)
31997        } else {
31998            Bytes::new(__input)
31999        };
32000        let mut __struct = Self::default();
32001        __struct.usec = buf.get_u64_le()?;
32002        __struct.x = buf.get_f32_le()?;
32003        __struct.y = buf.get_f32_le()?;
32004        __struct.z = buf.get_f32_le()?;
32005        __struct.roll = buf.get_f32_le()?;
32006        __struct.pitch = buf.get_f32_le()?;
32007        __struct.yaw = buf.get_f32_le()?;
32008        for v in &mut __struct.covariance {
32009            let val = buf.get_f32_le()?;
32010            *v = val;
32011        }
32012        __struct.reset_counter = buf.get_u8()?;
32013        Ok(__struct)
32014    }
32015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32016        let mut __tmp = BytesMut::new(bytes);
32017        #[allow(clippy::absurd_extreme_comparisons)]
32018        #[allow(unused_comparisons)]
32019        if __tmp.remaining() < Self::ENCODED_LEN {
32020            panic!(
32021                "buffer is too small (need {} bytes, but got {})",
32022                Self::ENCODED_LEN,
32023                __tmp.remaining(),
32024            )
32025        }
32026        __tmp.put_u64_le(self.usec);
32027        __tmp.put_f32_le(self.x);
32028        __tmp.put_f32_le(self.y);
32029        __tmp.put_f32_le(self.z);
32030        __tmp.put_f32_le(self.roll);
32031        __tmp.put_f32_le(self.pitch);
32032        __tmp.put_f32_le(self.yaw);
32033        if matches!(version, MavlinkVersion::V2) {
32034            for val in &self.covariance {
32035                __tmp.put_f32_le(*val);
32036            }
32037            __tmp.put_u8(self.reset_counter);
32038            let len = __tmp.len();
32039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32040        } else {
32041            __tmp.len()
32042        }
32043    }
32044}
32045#[doc = "Speed estimate from a vision source."]
32046#[doc = ""]
32047#[doc = "ID: 103"]
32048#[derive(Debug, Clone, PartialEq)]
32049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32051#[cfg_attr(feature = "ts", derive(TS))]
32052#[cfg_attr(feature = "ts", ts(export))]
32053pub struct VISION_SPEED_ESTIMATE_DATA {
32054    #[doc = "Timestamp (UNIX time or time since system boot)"]
32055    pub usec: u64,
32056    #[doc = "Global X speed"]
32057    pub x: f32,
32058    #[doc = "Global Y speed"]
32059    pub y: f32,
32060    #[doc = "Global Z speed"]
32061    pub z: f32,
32062    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32063    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32066    pub covariance: [f32; 9],
32067    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32068    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32069    pub reset_counter: u8,
32070}
32071impl VISION_SPEED_ESTIMATE_DATA {
32072    pub const ENCODED_LEN: usize = 57usize;
32073    pub const DEFAULT: Self = Self {
32074        usec: 0_u64,
32075        x: 0.0_f32,
32076        y: 0.0_f32,
32077        z: 0.0_f32,
32078        covariance: [0.0_f32; 9usize],
32079        reset_counter: 0_u8,
32080    };
32081    #[cfg(feature = "arbitrary")]
32082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32083        use arbitrary::{Arbitrary, Unstructured};
32084        let mut buf = [0u8; 1024];
32085        rng.fill_bytes(&mut buf);
32086        let mut unstructured = Unstructured::new(&buf);
32087        Self::arbitrary(&mut unstructured).unwrap_or_default()
32088    }
32089}
32090impl Default for VISION_SPEED_ESTIMATE_DATA {
32091    fn default() -> Self {
32092        Self::DEFAULT.clone()
32093    }
32094}
32095impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32096    type Message = MavMessage;
32097    const ID: u32 = 103u32;
32098    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32099    const EXTRA_CRC: u8 = 208u8;
32100    const ENCODED_LEN: usize = 57usize;
32101    fn deser(
32102        _version: MavlinkVersion,
32103        __input: &[u8],
32104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32105        let avail_len = __input.len();
32106        let mut payload_buf = [0; Self::ENCODED_LEN];
32107        let mut buf = if avail_len < Self::ENCODED_LEN {
32108            payload_buf[0..avail_len].copy_from_slice(__input);
32109            Bytes::new(&payload_buf)
32110        } else {
32111            Bytes::new(__input)
32112        };
32113        let mut __struct = Self::default();
32114        __struct.usec = buf.get_u64_le()?;
32115        __struct.x = buf.get_f32_le()?;
32116        __struct.y = buf.get_f32_le()?;
32117        __struct.z = buf.get_f32_le()?;
32118        for v in &mut __struct.covariance {
32119            let val = buf.get_f32_le()?;
32120            *v = val;
32121        }
32122        __struct.reset_counter = buf.get_u8()?;
32123        Ok(__struct)
32124    }
32125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32126        let mut __tmp = BytesMut::new(bytes);
32127        #[allow(clippy::absurd_extreme_comparisons)]
32128        #[allow(unused_comparisons)]
32129        if __tmp.remaining() < Self::ENCODED_LEN {
32130            panic!(
32131                "buffer is too small (need {} bytes, but got {})",
32132                Self::ENCODED_LEN,
32133                __tmp.remaining(),
32134            )
32135        }
32136        __tmp.put_u64_le(self.usec);
32137        __tmp.put_f32_le(self.x);
32138        __tmp.put_f32_le(self.y);
32139        __tmp.put_f32_le(self.z);
32140        if matches!(version, MavlinkVersion::V2) {
32141            for val in &self.covariance {
32142                __tmp.put_f32_le(*val);
32143            }
32144            __tmp.put_u8(self.reset_counter);
32145            let len = __tmp.len();
32146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32147        } else {
32148            __tmp.len()
32149        }
32150    }
32151}
32152#[doc = "Cumulative distance traveled for each reported wheel."]
32153#[doc = ""]
32154#[doc = "ID: 9000"]
32155#[derive(Debug, Clone, PartialEq)]
32156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32158#[cfg_attr(feature = "ts", derive(TS))]
32159#[cfg_attr(feature = "ts", ts(export))]
32160pub struct WHEEL_DISTANCE_DATA {
32161    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32162    pub time_usec: u64,
32163    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32164    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32165    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32166    pub distance: [f64; 16],
32167    #[doc = "Number of wheels reported."]
32168    pub count: u8,
32169}
32170impl WHEEL_DISTANCE_DATA {
32171    pub const ENCODED_LEN: usize = 137usize;
32172    pub const DEFAULT: Self = Self {
32173        time_usec: 0_u64,
32174        distance: [0.0_f64; 16usize],
32175        count: 0_u8,
32176    };
32177    #[cfg(feature = "arbitrary")]
32178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32179        use arbitrary::{Arbitrary, Unstructured};
32180        let mut buf = [0u8; 1024];
32181        rng.fill_bytes(&mut buf);
32182        let mut unstructured = Unstructured::new(&buf);
32183        Self::arbitrary(&mut unstructured).unwrap_or_default()
32184    }
32185}
32186impl Default for WHEEL_DISTANCE_DATA {
32187    fn default() -> Self {
32188        Self::DEFAULT.clone()
32189    }
32190}
32191impl MessageData for WHEEL_DISTANCE_DATA {
32192    type Message = MavMessage;
32193    const ID: u32 = 9000u32;
32194    const NAME: &'static str = "WHEEL_DISTANCE";
32195    const EXTRA_CRC: u8 = 113u8;
32196    const ENCODED_LEN: usize = 137usize;
32197    fn deser(
32198        _version: MavlinkVersion,
32199        __input: &[u8],
32200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32201        let avail_len = __input.len();
32202        let mut payload_buf = [0; Self::ENCODED_LEN];
32203        let mut buf = if avail_len < Self::ENCODED_LEN {
32204            payload_buf[0..avail_len].copy_from_slice(__input);
32205            Bytes::new(&payload_buf)
32206        } else {
32207            Bytes::new(__input)
32208        };
32209        let mut __struct = Self::default();
32210        __struct.time_usec = buf.get_u64_le()?;
32211        for v in &mut __struct.distance {
32212            let val = buf.get_f64_le()?;
32213            *v = val;
32214        }
32215        __struct.count = buf.get_u8()?;
32216        Ok(__struct)
32217    }
32218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32219        let mut __tmp = BytesMut::new(bytes);
32220        #[allow(clippy::absurd_extreme_comparisons)]
32221        #[allow(unused_comparisons)]
32222        if __tmp.remaining() < Self::ENCODED_LEN {
32223            panic!(
32224                "buffer is too small (need {} bytes, but got {})",
32225                Self::ENCODED_LEN,
32226                __tmp.remaining(),
32227            )
32228        }
32229        __tmp.put_u64_le(self.time_usec);
32230        for val in &self.distance {
32231            __tmp.put_f64_le(*val);
32232        }
32233        __tmp.put_u8(self.count);
32234        if matches!(version, MavlinkVersion::V2) {
32235            let len = __tmp.len();
32236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32237        } else {
32238            __tmp.len()
32239        }
32240    }
32241}
32242#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32243#[doc = ""]
32244#[doc = "ID: 299"]
32245#[derive(Debug, Clone, PartialEq)]
32246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32248#[cfg_attr(feature = "ts", derive(TS))]
32249#[cfg_attr(feature = "ts", ts(export))]
32250pub struct WIFI_CONFIG_AP_DATA {
32251    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32252    #[cfg_attr(feature = "ts", ts(type = "string"))]
32253    pub ssid: CharArray<32>,
32254    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32255    #[cfg_attr(feature = "ts", ts(type = "string"))]
32256    pub password: CharArray<64>,
32257    #[doc = "WiFi Mode."]
32258    #[cfg_attr(feature = "serde", serde(default))]
32259    pub mode: WifiConfigApMode,
32260    #[doc = "Message acceptance response (sent back to GS)."]
32261    #[cfg_attr(feature = "serde", serde(default))]
32262    pub response: WifiConfigApResponse,
32263}
32264impl WIFI_CONFIG_AP_DATA {
32265    pub const ENCODED_LEN: usize = 98usize;
32266    pub const DEFAULT: Self = Self {
32267        ssid: CharArray::new([0_u8; 32usize]),
32268        password: CharArray::new([0_u8; 64usize]),
32269        mode: WifiConfigApMode::DEFAULT,
32270        response: WifiConfigApResponse::DEFAULT,
32271    };
32272    #[cfg(feature = "arbitrary")]
32273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32274        use arbitrary::{Arbitrary, Unstructured};
32275        let mut buf = [0u8; 1024];
32276        rng.fill_bytes(&mut buf);
32277        let mut unstructured = Unstructured::new(&buf);
32278        Self::arbitrary(&mut unstructured).unwrap_or_default()
32279    }
32280}
32281impl Default for WIFI_CONFIG_AP_DATA {
32282    fn default() -> Self {
32283        Self::DEFAULT.clone()
32284    }
32285}
32286impl MessageData for WIFI_CONFIG_AP_DATA {
32287    type Message = MavMessage;
32288    const ID: u32 = 299u32;
32289    const NAME: &'static str = "WIFI_CONFIG_AP";
32290    const EXTRA_CRC: u8 = 19u8;
32291    const ENCODED_LEN: usize = 98usize;
32292    fn deser(
32293        _version: MavlinkVersion,
32294        __input: &[u8],
32295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32296        let avail_len = __input.len();
32297        let mut payload_buf = [0; Self::ENCODED_LEN];
32298        let mut buf = if avail_len < Self::ENCODED_LEN {
32299            payload_buf[0..avail_len].copy_from_slice(__input);
32300            Bytes::new(&payload_buf)
32301        } else {
32302            Bytes::new(__input)
32303        };
32304        let mut __struct = Self::default();
32305        let mut tmp = [0_u8; 32usize];
32306        for v in &mut tmp {
32307            *v = buf.get_u8()?;
32308        }
32309        __struct.ssid = CharArray::new(tmp);
32310        let mut tmp = [0_u8; 64usize];
32311        for v in &mut tmp {
32312            *v = buf.get_u8()?;
32313        }
32314        __struct.password = CharArray::new(tmp);
32315        let tmp = buf.get_i8()?;
32316        __struct.mode =
32317            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32318                enum_type: "WifiConfigApMode",
32319                value: tmp as u64,
32320            })?;
32321        let tmp = buf.get_i8()?;
32322        __struct.response =
32323            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32324                enum_type: "WifiConfigApResponse",
32325                value: tmp as u64,
32326            })?;
32327        Ok(__struct)
32328    }
32329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32330        let mut __tmp = BytesMut::new(bytes);
32331        #[allow(clippy::absurd_extreme_comparisons)]
32332        #[allow(unused_comparisons)]
32333        if __tmp.remaining() < Self::ENCODED_LEN {
32334            panic!(
32335                "buffer is too small (need {} bytes, but got {})",
32336                Self::ENCODED_LEN,
32337                __tmp.remaining(),
32338            )
32339        }
32340        for val in &self.ssid {
32341            __tmp.put_u8(*val);
32342        }
32343        for val in &self.password {
32344            __tmp.put_u8(*val);
32345        }
32346        if matches!(version, MavlinkVersion::V2) {
32347            __tmp.put_i8(self.mode as i8);
32348            __tmp.put_i8(self.response as i8);
32349            let len = __tmp.len();
32350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32351        } else {
32352            __tmp.len()
32353        }
32354    }
32355}
32356#[doc = "Winch status."]
32357#[doc = ""]
32358#[doc = "ID: 9005"]
32359#[derive(Debug, Clone, PartialEq)]
32360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32362#[cfg_attr(feature = "ts", derive(TS))]
32363#[cfg_attr(feature = "ts", ts(export))]
32364pub struct WINCH_STATUS_DATA {
32365    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32366    pub time_usec: u64,
32367    #[doc = "Length of line released. NaN if unknown"]
32368    pub line_length: f32,
32369    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32370    pub speed: f32,
32371    #[doc = "Tension on the line. NaN if unknown"]
32372    pub tension: f32,
32373    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32374    pub voltage: f32,
32375    #[doc = "Current draw from the winch. NaN if unknown"]
32376    pub current: f32,
32377    #[doc = "Status flags"]
32378    pub status: MavWinchStatusFlag,
32379    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32380    pub temperature: i16,
32381}
32382impl WINCH_STATUS_DATA {
32383    pub const ENCODED_LEN: usize = 34usize;
32384    pub const DEFAULT: Self = Self {
32385        time_usec: 0_u64,
32386        line_length: 0.0_f32,
32387        speed: 0.0_f32,
32388        tension: 0.0_f32,
32389        voltage: 0.0_f32,
32390        current: 0.0_f32,
32391        status: MavWinchStatusFlag::DEFAULT,
32392        temperature: 0_i16,
32393    };
32394    #[cfg(feature = "arbitrary")]
32395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32396        use arbitrary::{Arbitrary, Unstructured};
32397        let mut buf = [0u8; 1024];
32398        rng.fill_bytes(&mut buf);
32399        let mut unstructured = Unstructured::new(&buf);
32400        Self::arbitrary(&mut unstructured).unwrap_or_default()
32401    }
32402}
32403impl Default for WINCH_STATUS_DATA {
32404    fn default() -> Self {
32405        Self::DEFAULT.clone()
32406    }
32407}
32408impl MessageData for WINCH_STATUS_DATA {
32409    type Message = MavMessage;
32410    const ID: u32 = 9005u32;
32411    const NAME: &'static str = "WINCH_STATUS";
32412    const EXTRA_CRC: u8 = 117u8;
32413    const ENCODED_LEN: usize = 34usize;
32414    fn deser(
32415        _version: MavlinkVersion,
32416        __input: &[u8],
32417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32418        let avail_len = __input.len();
32419        let mut payload_buf = [0; Self::ENCODED_LEN];
32420        let mut buf = if avail_len < Self::ENCODED_LEN {
32421            payload_buf[0..avail_len].copy_from_slice(__input);
32422            Bytes::new(&payload_buf)
32423        } else {
32424            Bytes::new(__input)
32425        };
32426        let mut __struct = Self::default();
32427        __struct.time_usec = buf.get_u64_le()?;
32428        __struct.line_length = buf.get_f32_le()?;
32429        __struct.speed = buf.get_f32_le()?;
32430        __struct.tension = buf.get_f32_le()?;
32431        __struct.voltage = buf.get_f32_le()?;
32432        __struct.current = buf.get_f32_le()?;
32433        let tmp = buf.get_u32_le()?;
32434        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
32435            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32436                flag_type: "MavWinchStatusFlag",
32437                value: tmp as u64,
32438            })?;
32439        __struct.temperature = buf.get_i16_le()?;
32440        Ok(__struct)
32441    }
32442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32443        let mut __tmp = BytesMut::new(bytes);
32444        #[allow(clippy::absurd_extreme_comparisons)]
32445        #[allow(unused_comparisons)]
32446        if __tmp.remaining() < Self::ENCODED_LEN {
32447            panic!(
32448                "buffer is too small (need {} bytes, but got {})",
32449                Self::ENCODED_LEN,
32450                __tmp.remaining(),
32451            )
32452        }
32453        __tmp.put_u64_le(self.time_usec);
32454        __tmp.put_f32_le(self.line_length);
32455        __tmp.put_f32_le(self.speed);
32456        __tmp.put_f32_le(self.tension);
32457        __tmp.put_f32_le(self.voltage);
32458        __tmp.put_f32_le(self.current);
32459        __tmp.put_u32_le(self.status.bits() as u32);
32460        __tmp.put_i16_le(self.temperature);
32461        if matches!(version, MavlinkVersion::V2) {
32462            let len = __tmp.len();
32463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32464        } else {
32465            __tmp.len()
32466        }
32467    }
32468}
32469#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32470#[doc = ""]
32471#[doc = "ID: 231"]
32472#[derive(Debug, Clone, PartialEq)]
32473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32475#[cfg_attr(feature = "ts", derive(TS))]
32476#[cfg_attr(feature = "ts", ts(export))]
32477pub struct WIND_COV_DATA {
32478    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32479    pub time_usec: u64,
32480    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32481    pub wind_x: f32,
32482    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32483    pub wind_y: f32,
32484    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32485    pub wind_z: f32,
32486    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32487    pub var_horiz: f32,
32488    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32489    pub var_vert: f32,
32490    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32491    pub wind_alt: f32,
32492    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32493    pub horiz_accuracy: f32,
32494    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32495    pub vert_accuracy: f32,
32496}
32497impl WIND_COV_DATA {
32498    pub const ENCODED_LEN: usize = 40usize;
32499    pub const DEFAULT: Self = Self {
32500        time_usec: 0_u64,
32501        wind_x: 0.0_f32,
32502        wind_y: 0.0_f32,
32503        wind_z: 0.0_f32,
32504        var_horiz: 0.0_f32,
32505        var_vert: 0.0_f32,
32506        wind_alt: 0.0_f32,
32507        horiz_accuracy: 0.0_f32,
32508        vert_accuracy: 0.0_f32,
32509    };
32510    #[cfg(feature = "arbitrary")]
32511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32512        use arbitrary::{Arbitrary, Unstructured};
32513        let mut buf = [0u8; 1024];
32514        rng.fill_bytes(&mut buf);
32515        let mut unstructured = Unstructured::new(&buf);
32516        Self::arbitrary(&mut unstructured).unwrap_or_default()
32517    }
32518}
32519impl Default for WIND_COV_DATA {
32520    fn default() -> Self {
32521        Self::DEFAULT.clone()
32522    }
32523}
32524impl MessageData for WIND_COV_DATA {
32525    type Message = MavMessage;
32526    const ID: u32 = 231u32;
32527    const NAME: &'static str = "WIND_COV";
32528    const EXTRA_CRC: u8 = 105u8;
32529    const ENCODED_LEN: usize = 40usize;
32530    fn deser(
32531        _version: MavlinkVersion,
32532        __input: &[u8],
32533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32534        let avail_len = __input.len();
32535        let mut payload_buf = [0; Self::ENCODED_LEN];
32536        let mut buf = if avail_len < Self::ENCODED_LEN {
32537            payload_buf[0..avail_len].copy_from_slice(__input);
32538            Bytes::new(&payload_buf)
32539        } else {
32540            Bytes::new(__input)
32541        };
32542        let mut __struct = Self::default();
32543        __struct.time_usec = buf.get_u64_le()?;
32544        __struct.wind_x = buf.get_f32_le()?;
32545        __struct.wind_y = buf.get_f32_le()?;
32546        __struct.wind_z = buf.get_f32_le()?;
32547        __struct.var_horiz = buf.get_f32_le()?;
32548        __struct.var_vert = buf.get_f32_le()?;
32549        __struct.wind_alt = buf.get_f32_le()?;
32550        __struct.horiz_accuracy = buf.get_f32_le()?;
32551        __struct.vert_accuracy = buf.get_f32_le()?;
32552        Ok(__struct)
32553    }
32554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32555        let mut __tmp = BytesMut::new(bytes);
32556        #[allow(clippy::absurd_extreme_comparisons)]
32557        #[allow(unused_comparisons)]
32558        if __tmp.remaining() < Self::ENCODED_LEN {
32559            panic!(
32560                "buffer is too small (need {} bytes, but got {})",
32561                Self::ENCODED_LEN,
32562                __tmp.remaining(),
32563            )
32564        }
32565        __tmp.put_u64_le(self.time_usec);
32566        __tmp.put_f32_le(self.wind_x);
32567        __tmp.put_f32_le(self.wind_y);
32568        __tmp.put_f32_le(self.wind_z);
32569        __tmp.put_f32_le(self.var_horiz);
32570        __tmp.put_f32_le(self.var_vert);
32571        __tmp.put_f32_le(self.wind_alt);
32572        __tmp.put_f32_le(self.horiz_accuracy);
32573        __tmp.put_f32_le(self.vert_accuracy);
32574        if matches!(version, MavlinkVersion::V2) {
32575            let len = __tmp.len();
32576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32577        } else {
32578            __tmp.len()
32579        }
32580    }
32581}
32582#[derive(Clone, PartialEq, Debug)]
32583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32584#[cfg_attr(feature = "serde", serde(tag = "type"))]
32585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32586#[cfg_attr(feature = "ts", derive(TS))]
32587#[cfg_attr(feature = "ts", ts(export))]
32588#[repr(u32)]
32589pub enum MavMessage {
32590    #[doc = "Set the vehicle attitude and body angular rates."]
32591    #[doc = ""]
32592    #[doc = "ID: 140"]
32593    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32594    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32595    #[doc = ""]
32596    #[doc = "ID: 375"]
32597    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32598    #[doc = "The location and information of an ADSB vehicle."]
32599    #[doc = ""]
32600    #[doc = "ID: 246"]
32601    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32602    #[doc = "The location and information of an AIS vessel."]
32603    #[doc = ""]
32604    #[doc = "ID: 301"]
32605    AIS_VESSEL(AIS_VESSEL_DATA),
32606    #[doc = "The current system altitude."]
32607    #[doc = ""]
32608    #[doc = "ID: 141"]
32609    ALTITUDE(ALTITUDE_DATA),
32610    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32611    #[doc = ""]
32612    #[doc = "ID: 30"]
32613    ATTITUDE(ATTITUDE_DATA),
32614    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32615    #[doc = ""]
32616    #[doc = "ID: 31"]
32617    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32618    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32619    #[doc = ""]
32620    #[doc = "ID: 61"]
32621    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32622    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32623    #[doc = ""]
32624    #[doc = "ID: 83"]
32625    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32626    #[doc = "Motion capture attitude and position."]
32627    #[doc = ""]
32628    #[doc = "ID: 138"]
32629    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32630    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32631    #[doc = ""]
32632    #[doc = "ID: 7"]
32633    AUTH_KEY(AUTH_KEY_DATA),
32634    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32635    #[doc = ""]
32636    #[doc = "ID: 286"]
32637    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32638    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32639    #[doc = ""]
32640    #[doc = "ID: 148"]
32641    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32642    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32643    #[doc = ""]
32644    #[doc = "ID: 435"]
32645    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32646    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32647    #[doc = ""]
32648    #[doc = "ID: 437"]
32649    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32650    #[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32651    #[doc = ""]
32652    #[doc = "ID: 60052"]
32653    AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA),
32654    #[doc = "Drone operation mode."]
32655    #[doc = ""]
32656    #[doc = "ID: 60053"]
32657    AVSS_DRONE_OPERATION_MODE(AVSS_DRONE_OPERATION_MODE_DATA),
32658    #[doc = "Drone position."]
32659    #[doc = ""]
32660    #[doc = "ID: 60051"]
32661    AVSS_DRONE_POSITION(AVSS_DRONE_POSITION_DATA),
32662    #[doc = "AVSS PRS system status."]
32663    #[doc = ""]
32664    #[doc = "ID: 60050"]
32665    AVSS_PRS_SYS_STATUS(AVSS_PRS_SYS_STATUS_DATA),
32666    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32667    #[doc = ""]
32668    #[doc = "ID: 372"]
32669    BATTERY_INFO(BATTERY_INFO_DATA),
32670    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32671    #[doc = ""]
32672    #[doc = "ID: 147"]
32673    BATTERY_STATUS(BATTERY_STATUS_DATA),
32674    #[doc = "Report button state change."]
32675    #[doc = ""]
32676    #[doc = "ID: 257"]
32677    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32678    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32679    #[doc = ""]
32680    #[doc = "ID: 262"]
32681    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32682    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32683    #[doc = ""]
32684    #[doc = "ID: 271"]
32685    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32686    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32687    #[doc = ""]
32688    #[doc = "ID: 263"]
32689    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32690    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32691    #[doc = ""]
32692    #[doc = "ID: 259"]
32693    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32694    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32695    #[doc = ""]
32696    #[doc = "ID: 260"]
32697    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32698    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32699    #[doc = ""]
32700    #[doc = "ID: 277"]
32701    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32702    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32703    #[doc = ""]
32704    #[doc = "ID: 276"]
32705    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32706    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32707    #[doc = ""]
32708    #[doc = "ID: 275"]
32709    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32710    #[doc = "Camera-IMU triggering and synchronisation message."]
32711    #[doc = ""]
32712    #[doc = "ID: 112"]
32713    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32714    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32715    #[doc = ""]
32716    #[doc = "ID: 387"]
32717    CANFD_FRAME(CANFD_FRAME_DATA),
32718    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32719    #[doc = ""]
32720    #[doc = "ID: 388"]
32721    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32722    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32723    #[doc = ""]
32724    #[doc = "ID: 386"]
32725    CAN_FRAME(CAN_FRAME_DATA),
32726    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32727    #[doc = ""]
32728    #[doc = "ID: 336"]
32729    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32730    #[doc = "Report current used cellular network status."]
32731    #[doc = ""]
32732    #[doc = "ID: 334"]
32733    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32734    #[doc = "Request to control this MAV."]
32735    #[doc = ""]
32736    #[doc = "ID: 5"]
32737    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32738    #[doc = "Accept / deny control of this MAV."]
32739    #[doc = ""]
32740    #[doc = "ID: 6"]
32741    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32742    #[doc = "Information about a potential collision."]
32743    #[doc = ""]
32744    #[doc = "ID: 247"]
32745    COLLISION(COLLISION_DATA),
32746    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32747    #[doc = ""]
32748    #[doc = "ID: 77"]
32749    COMMAND_ACK(COMMAND_ACK_DATA),
32750    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32751    #[doc = ""]
32752    #[doc = "ID: 80"]
32753    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32754    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32755    #[doc = ""]
32756    #[doc = "ID: 75"]
32757    COMMAND_INT(COMMAND_INT_DATA),
32758    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32759    #[doc = ""]
32760    #[doc = "ID: 76"]
32761    COMMAND_LONG(COMMAND_LONG_DATA),
32762    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32763    #[doc = ""]
32764    #[doc = "ID: 395"]
32765    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32766    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32767    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32768    #[doc = ""]
32769    #[doc = "ID: 396"]
32770    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32771    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32772    #[doc = ""]
32773    #[doc = "ID: 397"]
32774    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32775    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32776    #[doc = ""]
32777    #[doc = "ID: 146"]
32778    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32779    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32780    #[doc = ""]
32781    #[doc = "ID: 411"]
32782    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32783    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32784    #[doc = ""]
32785    #[doc = "ID: 436"]
32786    CURRENT_MODE(CURRENT_MODE_DATA),
32787    #[doc = "Data stream status information."]
32788    #[doc = ""]
32789    #[doc = "ID: 67"]
32790    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32791    DATA_STREAM(DATA_STREAM_DATA),
32792    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32793    #[doc = ""]
32794    #[doc = "ID: 130"]
32795    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32796    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32797    #[doc = ""]
32798    #[doc = "ID: 254"]
32799    DEBUG(DEBUG_DATA),
32800    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32801    #[doc = ""]
32802    #[doc = "ID: 350"]
32803    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32804    #[doc = "To debug something using a named 3D vector."]
32805    #[doc = ""]
32806    #[doc = "ID: 250"]
32807    DEBUG_VECT(DEBUG_VECT_DATA),
32808    #[doc = "Distance sensor information for an onboard rangefinder."]
32809    #[doc = ""]
32810    #[doc = "ID: 132"]
32811    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32812    #[doc = "EFI status output."]
32813    #[doc = ""]
32814    #[doc = "ID: 225"]
32815    EFI_STATUS(EFI_STATUS_DATA),
32816    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32817    #[doc = ""]
32818    #[doc = "ID: 131"]
32819    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32820    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32821    #[doc = ""]
32822    #[doc = "ID: 290"]
32823    ESC_INFO(ESC_INFO_DATA),
32824    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32825    #[doc = ""]
32826    #[doc = "ID: 291"]
32827    ESC_STATUS(ESC_STATUS_DATA),
32828    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32829    #[doc = ""]
32830    #[doc = "ID: 230"]
32831    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32832    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32833    #[doc = ""]
32834    #[doc = "ID: 410"]
32835    EVENT(EVENT_DATA),
32836    #[doc = "Provides state for additional features."]
32837    #[doc = ""]
32838    #[doc = "ID: 245"]
32839    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32840    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32841    #[doc = ""]
32842    #[doc = "ID: 162"]
32843    FENCE_STATUS(FENCE_STATUS_DATA),
32844    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32845    #[doc = ""]
32846    #[doc = "ID: 110"]
32847    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32848    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32849    #[doc = ""]
32850    #[doc = "ID: 264"]
32851    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32852    #[doc = "Current motion information from a designated system."]
32853    #[doc = ""]
32854    #[doc = "ID: 144"]
32855    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32856    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32857    #[doc = ""]
32858    #[doc = "ID: 371"]
32859    FUEL_STATUS(FUEL_STATUS_DATA),
32860    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32861    #[doc = ""]
32862    #[doc = "ID: 373"]
32863    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32864    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32865    #[doc = ""]
32866    #[doc = "ID: 285"]
32867    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32868    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32869    #[doc = ""]
32870    #[doc = "ID: 283"]
32871    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32872    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32873    #[doc = ""]
32874    #[doc = "ID: 284"]
32875    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32876    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32877    #[doc = ""]
32878    #[doc = "ID: 280"]
32879    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32880    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32881    #[doc = ""]
32882    #[doc = "ID: 282"]
32883    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32884    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32885    #[doc = ""]
32886    #[doc = "ID: 288"]
32887    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32888    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32889    #[doc = ""]
32890    #[doc = "ID: 287"]
32891    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32892    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32893    #[doc = ""]
32894    #[doc = "ID: 281"]
32895    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32896    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32897    #[doc = ""]
32898    #[doc = "ID: 33"]
32899    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32900    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32901    #[doc = ""]
32902    #[doc = "ID: 63"]
32903    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32904    #[doc = "Global position/attitude estimate from a vision source."]
32905    #[doc = ""]
32906    #[doc = "ID: 101"]
32907    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32908    #[doc = "Second GPS data."]
32909    #[doc = ""]
32910    #[doc = "ID: 124"]
32911    GPS2_RAW(GPS2_RAW_DATA),
32912    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32913    #[doc = ""]
32914    #[doc = "ID: 128"]
32915    GPS2_RTK(GPS2_RTK_DATA),
32916    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32917    #[doc = ""]
32918    #[doc = "ID: 49"]
32919    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32920    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32921    #[doc = ""]
32922    #[doc = "ID: 123"]
32923    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32924    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32925    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32926    #[doc = ""]
32927    #[doc = "ID: 232"]
32928    GPS_INPUT(GPS_INPUT_DATA),
32929    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32930    #[doc = ""]
32931    #[doc = "ID: 24"]
32932    GPS_RAW_INT(GPS_RAW_INT_DATA),
32933    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32934    #[doc = ""]
32935    #[doc = "ID: 233"]
32936    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32937    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32938    #[doc = ""]
32939    #[doc = "ID: 127"]
32940    GPS_RTK(GPS_RTK_DATA),
32941    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32942    #[doc = ""]
32943    #[doc = "ID: 25"]
32944    GPS_STATUS(GPS_STATUS_DATA),
32945    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32946    #[doc = ""]
32947    #[doc = "ID: 0"]
32948    HEARTBEAT(HEARTBEAT_DATA),
32949    #[doc = "The IMU readings in SI units in NED body frame."]
32950    #[doc = ""]
32951    #[doc = "ID: 105"]
32952    HIGHRES_IMU(HIGHRES_IMU_DATA),
32953    #[doc = "Message appropriate for high latency connections like Iridium."]
32954    #[doc = ""]
32955    #[doc = "ID: 234"]
32956    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32957    HIGH_LATENCY(HIGH_LATENCY_DATA),
32958    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32959    #[doc = ""]
32960    #[doc = "ID: 235"]
32961    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32962    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32963    #[doc = ""]
32964    #[doc = "ID: 93"]
32965    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32966    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32967    #[doc = ""]
32968    #[doc = "ID: 91"]
32969    HIL_CONTROLS(HIL_CONTROLS_DATA),
32970    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32971    #[doc = ""]
32972    #[doc = "ID: 113"]
32973    HIL_GPS(HIL_GPS_DATA),
32974    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32975    #[doc = ""]
32976    #[doc = "ID: 114"]
32977    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32978    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32979    #[doc = ""]
32980    #[doc = "ID: 92"]
32981    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32982    #[doc = "The IMU readings in SI units in NED body frame."]
32983    #[doc = ""]
32984    #[doc = "ID: 107"]
32985    HIL_SENSOR(HIL_SENSOR_DATA),
32986    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32987    #[doc = ""]
32988    #[doc = "ID: 90"]
32989    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32990    HIL_STATE(HIL_STATE_DATA),
32991    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32992    #[doc = ""]
32993    #[doc = "ID: 115"]
32994    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32995    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32996    #[doc = ""]
32997    #[doc = "ID: 242"]
32998    HOME_POSITION(HOME_POSITION_DATA),
32999    #[doc = "Temperature and humidity from hygrometer."]
33000    #[doc = ""]
33001    #[doc = "ID: 12920"]
33002    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33003    #[doc = "Illuminator status."]
33004    #[doc = ""]
33005    #[doc = "ID: 440"]
33006    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33007    #[doc = "Status of the Iridium SBD link."]
33008    #[doc = ""]
33009    #[doc = "ID: 335"]
33010    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33011    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33012    #[doc = ""]
33013    #[doc = "ID: 149"]
33014    LANDING_TARGET(LANDING_TARGET_DATA),
33015    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33016    #[doc = ""]
33017    #[doc = "ID: 8"]
33018    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33019    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33020    #[doc = ""]
33021    #[doc = "ID: 32"]
33022    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33023    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33024    #[doc = ""]
33025    #[doc = "ID: 64"]
33026    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33027    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33028    #[doc = ""]
33029    #[doc = "ID: 89"]
33030    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33031    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33032    #[doc = ""]
33033    #[doc = "ID: 268"]
33034    LOGGING_ACK(LOGGING_ACK_DATA),
33035    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33036    #[doc = ""]
33037    #[doc = "ID: 266"]
33038    LOGGING_DATA(LOGGING_DATA_DATA),
33039    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33040    #[doc = ""]
33041    #[doc = "ID: 267"]
33042    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33043    #[doc = "Reply to LOG_REQUEST_DATA."]
33044    #[doc = ""]
33045    #[doc = "ID: 120"]
33046    LOG_DATA(LOG_DATA_DATA),
33047    #[doc = "Reply to LOG_REQUEST_LIST."]
33048    #[doc = ""]
33049    #[doc = "ID: 118"]
33050    LOG_ENTRY(LOG_ENTRY_DATA),
33051    #[doc = "Erase all logs."]
33052    #[doc = ""]
33053    #[doc = "ID: 121"]
33054    LOG_ERASE(LOG_ERASE_DATA),
33055    #[doc = "Request a chunk of a log."]
33056    #[doc = ""]
33057    #[doc = "ID: 119"]
33058    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33059    #[doc = "Stop log transfer and resume normal logging."]
33060    #[doc = ""]
33061    #[doc = "ID: 122"]
33062    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33063    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33064    #[doc = ""]
33065    #[doc = "ID: 117"]
33066    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33067    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33068    #[doc = ""]
33069    #[doc = "ID: 192"]
33070    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33071    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33072    #[doc = ""]
33073    #[doc = "ID: 69"]
33074    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33075    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33076    #[doc = ""]
33077    #[doc = "ID: 81"]
33078    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33079    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33080    #[doc = ""]
33081    #[doc = "ID: 249"]
33082    MEMORY_VECT(MEMORY_VECT_DATA),
33083    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33084    #[doc = ""]
33085    #[doc = "ID: 244"]
33086    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33087    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33088    #[doc = ""]
33089    #[doc = "ID: 47"]
33090    MISSION_ACK(MISSION_ACK_DATA),
33091    #[doc = "Delete all mission items at once."]
33092    #[doc = ""]
33093    #[doc = "ID: 45"]
33094    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33095    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33096    #[doc = ""]
33097    #[doc = "ID: 44"]
33098    MISSION_COUNT(MISSION_COUNT_DATA),
33099    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33100    #[doc = ""]
33101    #[doc = "ID: 42"]
33102    MISSION_CURRENT(MISSION_CURRENT_DATA),
33103    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33104    #[doc = ""]
33105    #[doc = "ID: 39"]
33106    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33107    MISSION_ITEM(MISSION_ITEM_DATA),
33108    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33109    #[doc = ""]
33110    #[doc = "ID: 73"]
33111    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33112    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33113    #[doc = ""]
33114    #[doc = "ID: 46"]
33115    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33116    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33117    #[doc = ""]
33118    #[doc = "ID: 40"]
33119    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33120    MISSION_REQUEST(MISSION_REQUEST_DATA),
33121    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33122    #[doc = ""]
33123    #[doc = "ID: 51"]
33124    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33125    #[doc = "Request the overall list of mission items from the system/component."]
33126    #[doc = ""]
33127    #[doc = "ID: 43"]
33128    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33129    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33130    #[doc = ""]
33131    #[doc = "ID: 37"]
33132    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33133    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33134    #[doc = ""]
33135    #[doc = "ID: 41"]
33136    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33137    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33138    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33139    #[doc = ""]
33140    #[doc = "ID: 38"]
33141    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33142    #[doc = "Orientation of a mount."]
33143    #[doc = ""]
33144    #[doc = "ID: 265"]
33145    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33146    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33147    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33148    #[doc = ""]
33149    #[doc = "ID: 251"]
33150    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33151    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33152    #[doc = ""]
33153    #[doc = "ID: 252"]
33154    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33155    #[doc = "The state of the navigation and position controller."]
33156    #[doc = ""]
33157    #[doc = "ID: 62"]
33158    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33159    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33160    #[doc = ""]
33161    #[doc = "ID: 330"]
33162    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33163    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33164    #[doc = ""]
33165    #[doc = "ID: 331"]
33166    ODOMETRY(ODOMETRY_DATA),
33167    #[doc = "Hardware status sent by an onboard computer."]
33168    #[doc = ""]
33169    #[doc = "ID: 390"]
33170    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33171    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33172    #[doc = ""]
33173    #[doc = "ID: 12918"]
33174    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33175    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33176    #[doc = ""]
33177    #[doc = "ID: 12902"]
33178    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33179    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33180    #[doc = ""]
33181    #[doc = "ID: 12900"]
33182    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33183    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33184    #[doc = ""]
33185    #[doc = "ID: 12901"]
33186    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33187    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33188    #[doc = ""]
33189    #[doc = "ID: 12915"]
33190    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33191    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33192    #[doc = ""]
33193    #[doc = "ID: 12905"]
33194    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33195    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33196    #[doc = ""]
33197    #[doc = "ID: 12903"]
33198    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33199    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33200    #[doc = ""]
33201    #[doc = "ID: 12904"]
33202    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33203    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33204    #[doc = ""]
33205    #[doc = "ID: 12919"]
33206    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33207    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33208    #[doc = ""]
33209    #[doc = "ID: 100"]
33210    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33211    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33212    #[doc = ""]
33213    #[doc = "ID: 106"]
33214    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33215    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33216    #[doc = ""]
33217    #[doc = "ID: 360"]
33218    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33219    #[doc = "Response from a PARAM_EXT_SET message."]
33220    #[doc = ""]
33221    #[doc = "ID: 324"]
33222    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33223    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33224    #[doc = ""]
33225    #[doc = "ID: 321"]
33226    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33227    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33228    #[doc = ""]
33229    #[doc = "ID: 320"]
33230    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33231    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33232    #[doc = ""]
33233    #[doc = "ID: 323"]
33234    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33235    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33236    #[doc = ""]
33237    #[doc = "ID: 322"]
33238    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33239    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33240    #[doc = ""]
33241    #[doc = "ID: 50"]
33242    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33243    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33244    #[doc = ""]
33245    #[doc = "ID: 21"]
33246    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33247    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33248    #[doc = ""]
33249    #[doc = "ID: 20"]
33250    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33251    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33252    #[doc = ""]
33253    #[doc = "ID: 23"]
33254    PARAM_SET(PARAM_SET_DATA),
33255    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33256    #[doc = ""]
33257    #[doc = "ID: 22"]
33258    PARAM_VALUE(PARAM_VALUE_DATA),
33259    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33260    #[doc = ""]
33261    #[doc = "ID: 4"]
33262    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33263    PING(PING_DATA),
33264    #[doc = "Control vehicle tone generation (buzzer)."]
33265    #[doc = ""]
33266    #[doc = "ID: 258"]
33267    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33268    PLAY_TUNE(PLAY_TUNE_DATA),
33269    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33270    #[doc = ""]
33271    #[doc = "ID: 400"]
33272    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33273    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33274    #[doc = ""]
33275    #[doc = "ID: 87"]
33276    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33277    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33278    #[doc = ""]
33279    #[doc = "ID: 85"]
33280    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33281    #[doc = "Power supply status."]
33282    #[doc = ""]
33283    #[doc = "ID: 125"]
33284    POWER_STATUS(POWER_STATUS_DATA),
33285    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33286    #[doc = ""]
33287    #[doc = "ID: 300"]
33288    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33289    #[doc = "Status generated by radio and injected into MAVLink stream."]
33290    #[doc = ""]
33291    #[doc = "ID: 109"]
33292    RADIO_STATUS(RADIO_STATUS_DATA),
33293    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33294    #[doc = ""]
33295    #[doc = "ID: 27"]
33296    RAW_IMU(RAW_IMU_DATA),
33297    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33298    #[doc = ""]
33299    #[doc = "ID: 28"]
33300    RAW_PRESSURE(RAW_PRESSURE_DATA),
33301    #[doc = "RPM sensor data message."]
33302    #[doc = ""]
33303    #[doc = "ID: 339"]
33304    RAW_RPM(RAW_RPM_DATA),
33305    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33306    #[doc = ""]
33307    #[doc = "ID: 65"]
33308    RC_CHANNELS(RC_CHANNELS_DATA),
33309    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33310    #[doc = ""]
33311    #[doc = "ID: 70"]
33312    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33313    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33314    #[doc = ""]
33315    #[doc = "ID: 35"]
33316    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33317    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33318    #[doc = ""]
33319    #[doc = "ID: 34"]
33320    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33321    #[doc = "Request a data stream."]
33322    #[doc = ""]
33323    #[doc = "ID: 66"]
33324    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33325    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33326    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33327    #[doc = ""]
33328    #[doc = "ID: 412"]
33329    REQUEST_EVENT(REQUEST_EVENT_DATA),
33330    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33331    #[doc = ""]
33332    #[doc = "ID: 142"]
33333    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33334    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33335    #[doc = ""]
33336    #[doc = "ID: 413"]
33337    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33338    #[doc = "Read out the safety zone the MAV currently assumes."]
33339    #[doc = ""]
33340    #[doc = "ID: 55"]
33341    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33342    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33343    #[doc = ""]
33344    #[doc = "ID: 54"]
33345    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33346    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33347    #[doc = ""]
33348    #[doc = "ID: 26"]
33349    SCALED_IMU(SCALED_IMU_DATA),
33350    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33351    #[doc = ""]
33352    #[doc = "ID: 116"]
33353    SCALED_IMU2(SCALED_IMU2_DATA),
33354    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33355    #[doc = ""]
33356    #[doc = "ID: 129"]
33357    SCALED_IMU3(SCALED_IMU3_DATA),
33358    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33359    #[doc = ""]
33360    #[doc = "ID: 29"]
33361    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33362    #[doc = "Barometer readings for 2nd barometer."]
33363    #[doc = ""]
33364    #[doc = "ID: 137"]
33365    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33366    #[doc = "Barometer readings for 3rd barometer."]
33367    #[doc = ""]
33368    #[doc = "ID: 143"]
33369    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33370    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33371    #[doc = ""]
33372    #[doc = "ID: 126"]
33373    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33374    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33375    #[doc = ""]
33376    #[doc = "ID: 36"]
33377    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33378    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33379    #[doc = ""]
33380    #[doc = "ID: 256"]
33381    SETUP_SIGNING(SETUP_SIGNING_DATA),
33382    #[doc = "Set the vehicle attitude and body angular rates."]
33383    #[doc = ""]
33384    #[doc = "ID: 139"]
33385    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33386    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33387    #[doc = ""]
33388    #[doc = "ID: 82"]
33389    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33390    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33391    #[doc = ""]
33392    #[doc = "ID: 48"]
33393    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33394    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33395    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33396    #[doc = ""]
33397    #[doc = "ID: 243"]
33398    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33399    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33400    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33401    #[doc = ""]
33402    #[doc = "ID: 11"]
33403    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33404    SET_MODE(SET_MODE_DATA),
33405    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33406    #[doc = ""]
33407    #[doc = "ID: 86"]
33408    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33409    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33410    #[doc = ""]
33411    #[doc = "ID: 84"]
33412    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33413    #[doc = "Status of simulation environment, if used."]
33414    #[doc = ""]
33415    #[doc = "ID: 108"]
33416    SIM_STATE(SIM_STATE_DATA),
33417    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33418    #[doc = ""]
33419    #[doc = "ID: 370"]
33420    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33421    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33422    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33423    #[doc = ""]
33424    #[doc = "ID: 253"]
33425    STATUSTEXT(STATUSTEXT_DATA),
33426    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33427    #[doc = ""]
33428    #[doc = "ID: 261"]
33429    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33430    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33431    #[doc = ""]
33432    #[doc = "ID: 401"]
33433    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33434    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33435    #[doc = ""]
33436    #[doc = "ID: 2"]
33437    SYSTEM_TIME(SYSTEM_TIME_DATA),
33438    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33439    #[doc = ""]
33440    #[doc = "ID: 1"]
33441    SYS_STATUS(SYS_STATUS_DATA),
33442    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33443    #[doc = ""]
33444    #[doc = "ID: 135"]
33445    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33446    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33447    #[doc = ""]
33448    #[doc = "ID: 134"]
33449    TERRAIN_DATA(TERRAIN_DATA_DATA),
33450    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33451    #[doc = ""]
33452    #[doc = "ID: 136"]
33453    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33454    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33455    #[doc = ""]
33456    #[doc = "ID: 133"]
33457    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33458    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33459    #[doc = ""]
33460    #[doc = "ID: 111"]
33461    TIMESYNC(TIMESYNC_DATA),
33462    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33463    #[doc = ""]
33464    #[doc = "ID: 380"]
33465    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33466    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33467    #[doc = ""]
33468    #[doc = "ID: 333"]
33469    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33470    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33471    #[doc = ""]
33472    #[doc = "ID: 332"]
33473    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33474    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33475    #[doc = ""]
33476    #[doc = "ID: 385"]
33477    TUNNEL(TUNNEL_DATA),
33478    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33479    #[doc = ""]
33480    #[doc = "ID: 311"]
33481    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33482    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33483    #[doc = ""]
33484    #[doc = "ID: 310"]
33485    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33486    #[doc = "The global position resulting from GPS and sensor fusion."]
33487    #[doc = ""]
33488    #[doc = "ID: 340"]
33489    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33490    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33491    #[doc = ""]
33492    #[doc = "ID: 248"]
33493    V2_EXTENSION(V2_EXTENSION_DATA),
33494    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33495    #[doc = ""]
33496    #[doc = "ID: 74"]
33497    VFR_HUD(VFR_HUD_DATA),
33498    #[doc = "Vibration levels and accelerometer clipping."]
33499    #[doc = ""]
33500    #[doc = "ID: 241"]
33501    VIBRATION(VIBRATION_DATA),
33502    #[doc = "Global position estimate from a Vicon motion system source."]
33503    #[doc = ""]
33504    #[doc = "ID: 104"]
33505    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33506    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33507    #[doc = ""]
33508    #[doc = "ID: 269"]
33509    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33510    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33511    #[doc = ""]
33512    #[doc = "ID: 270"]
33513    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33514    #[doc = "Local position/attitude estimate from a vision source."]
33515    #[doc = ""]
33516    #[doc = "ID: 102"]
33517    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33518    #[doc = "Speed estimate from a vision source."]
33519    #[doc = ""]
33520    #[doc = "ID: 103"]
33521    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33522    #[doc = "Cumulative distance traveled for each reported wheel."]
33523    #[doc = ""]
33524    #[doc = "ID: 9000"]
33525    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33526    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33527    #[doc = ""]
33528    #[doc = "ID: 299"]
33529    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33530    #[doc = "Winch status."]
33531    #[doc = ""]
33532    #[doc = "ID: 9005"]
33533    WINCH_STATUS(WINCH_STATUS_DATA),
33534    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33535    #[doc = ""]
33536    #[doc = "ID: 231"]
33537    WIND_COV(WIND_COV_DATA),
33538}
33539impl MavMessage {
33540    pub const fn all_ids() -> &'static [u32] {
33541        &[
33542            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33543            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33544            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33545            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33546            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33547            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33548            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33549            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33550            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33551            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33552            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33553            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33554            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33555            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33556            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33557            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33558            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33559            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33560            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33561            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33562            12915u32, 12918u32, 12919u32, 12920u32, 60050u32, 60051u32, 60052u32, 60053u32,
33563        ]
33564    }
33565    pub const fn all_messages() -> &'static [(&'static str, u32)] {
33566        &[
33567            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
33568            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
33569            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
33570            (PING_DATA::NAME, PING_DATA::ID),
33571            (
33572                CHANGE_OPERATOR_CONTROL_DATA::NAME,
33573                CHANGE_OPERATOR_CONTROL_DATA::ID,
33574            ),
33575            (
33576                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
33577                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33578            ),
33579            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
33580            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
33581            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
33582            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
33583            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
33584            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
33585            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
33586            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
33587            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
33588            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
33589            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
33590            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
33591            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
33592            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
33593            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
33594            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
33595            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
33596            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
33597            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
33598            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
33599            (
33600                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
33601                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
33602            ),
33603            (
33604                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
33605                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
33606            ),
33607            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
33608            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
33609            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
33610            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
33611            (
33612                MISSION_REQUEST_LIST_DATA::NAME,
33613                MISSION_REQUEST_LIST_DATA::ID,
33614            ),
33615            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
33616            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
33617            (
33618                MISSION_ITEM_REACHED_DATA::NAME,
33619                MISSION_ITEM_REACHED_DATA::ID,
33620            ),
33621            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
33622            (
33623                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33624                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
33625            ),
33626            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
33627            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
33628            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
33629            (
33630                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33631                SAFETY_SET_ALLOWED_AREA_DATA::ID,
33632            ),
33633            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
33634            (
33635                ATTITUDE_QUATERNION_COV_DATA::NAME,
33636                ATTITUDE_QUATERNION_COV_DATA::ID,
33637            ),
33638            (
33639                NAV_CONTROLLER_OUTPUT_DATA::NAME,
33640                NAV_CONTROLLER_OUTPUT_DATA::ID,
33641            ),
33642            (
33643                GLOBAL_POSITION_INT_COV_DATA::NAME,
33644                GLOBAL_POSITION_INT_COV_DATA::ID,
33645            ),
33646            (
33647                LOCAL_POSITION_NED_COV_DATA::NAME,
33648                LOCAL_POSITION_NED_COV_DATA::ID,
33649            ),
33650            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
33651            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
33652            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
33653            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
33654            (
33655                RC_CHANNELS_OVERRIDE_DATA::NAME,
33656                RC_CHANNELS_OVERRIDE_DATA::ID,
33657            ),
33658            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
33659            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
33660            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
33661            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
33662            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
33663            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
33664            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
33665            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
33666            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
33667            (
33668                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33669                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
33670            ),
33671            (
33672                POSITION_TARGET_LOCAL_NED_DATA::NAME,
33673                POSITION_TARGET_LOCAL_NED_DATA::ID,
33674            ),
33675            (
33676                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33677                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
33678            ),
33679            (
33680                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33681                POSITION_TARGET_GLOBAL_INT_DATA::ID,
33682            ),
33683            (
33684                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
33685                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
33686            ),
33687            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
33688            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
33689            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
33690            (
33691                HIL_ACTUATOR_CONTROLS_DATA::NAME,
33692                HIL_ACTUATOR_CONTROLS_DATA::ID,
33693            ),
33694            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
33695            (
33696                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
33697                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
33698            ),
33699            (
33700                VISION_POSITION_ESTIMATE_DATA::NAME,
33701                VISION_POSITION_ESTIMATE_DATA::ID,
33702            ),
33703            (
33704                VISION_SPEED_ESTIMATE_DATA::NAME,
33705                VISION_SPEED_ESTIMATE_DATA::ID,
33706            ),
33707            (
33708                VICON_POSITION_ESTIMATE_DATA::NAME,
33709                VICON_POSITION_ESTIMATE_DATA::ID,
33710            ),
33711            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
33712            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
33713            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
33714            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
33715            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
33716            (
33717                FILE_TRANSFER_PROTOCOL_DATA::NAME,
33718                FILE_TRANSFER_PROTOCOL_DATA::ID,
33719            ),
33720            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
33721            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
33722            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
33723            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
33724            (
33725                HIL_STATE_QUATERNION_DATA::NAME,
33726                HIL_STATE_QUATERNION_DATA::ID,
33727            ),
33728            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
33729            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
33730            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
33731            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
33732            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
33733            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
33734            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
33735            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
33736            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
33737            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
33738            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
33739            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
33740            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
33741            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
33742            (
33743                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
33744                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33745            ),
33746            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
33747            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
33748            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
33749            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
33750            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
33751            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
33752            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
33753            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
33754            (
33755                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33756                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
33757            ),
33758            (
33759                ACTUATOR_CONTROL_TARGET_DATA::NAME,
33760                ACTUATOR_CONTROL_TARGET_DATA::ID,
33761            ),
33762            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
33763            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
33764            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
33765            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
33766            (
33767                CONTROL_SYSTEM_STATE_DATA::NAME,
33768                CONTROL_SYSTEM_STATE_DATA::ID,
33769            ),
33770            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
33771            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
33772            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
33773            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
33774            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
33775            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
33776            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
33777            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
33778            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
33779            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
33780            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
33781            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
33782            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
33783            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
33784            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
33785            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
33786            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
33787            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
33788            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
33789            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
33790            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
33791            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
33792            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
33793            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
33794            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
33795            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
33796            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
33797            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
33798            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
33799            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
33800            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
33801            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
33802            (
33803                CAMERA_CAPTURE_STATUS_DATA::NAME,
33804                CAMERA_CAPTURE_STATUS_DATA::ID,
33805            ),
33806            (
33807                CAMERA_IMAGE_CAPTURED_DATA::NAME,
33808                CAMERA_IMAGE_CAPTURED_DATA::ID,
33809            ),
33810            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
33811            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
33812            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
33813            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
33814            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
33815            (
33816                VIDEO_STREAM_INFORMATION_DATA::NAME,
33817                VIDEO_STREAM_INFORMATION_DATA::ID,
33818            ),
33819            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
33820            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
33821            (
33822                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
33823                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33824            ),
33825            (
33826                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
33827                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33828            ),
33829            (
33830                CAMERA_THERMAL_RANGE_DATA::NAME,
33831                CAMERA_THERMAL_RANGE_DATA::ID,
33832            ),
33833            (
33834                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33835                GIMBAL_MANAGER_INFORMATION_DATA::ID,
33836            ),
33837            (
33838                GIMBAL_MANAGER_STATUS_DATA::NAME,
33839                GIMBAL_MANAGER_STATUS_DATA::ID,
33840            ),
33841            (
33842                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
33843                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
33844            ),
33845            (
33846                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
33847                GIMBAL_DEVICE_INFORMATION_DATA::ID,
33848            ),
33849            (
33850                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
33851                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
33852            ),
33853            (
33854                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
33855                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
33856            ),
33857            (
33858                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
33859                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
33860            ),
33861            (
33862                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
33863                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
33864            ),
33865            (
33866                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
33867                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
33868            ),
33869            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
33870            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
33871            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
33872            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
33873            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
33874            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
33875            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
33876            (
33877                PARAM_EXT_REQUEST_READ_DATA::NAME,
33878                PARAM_EXT_REQUEST_READ_DATA::ID,
33879            ),
33880            (
33881                PARAM_EXT_REQUEST_LIST_DATA::NAME,
33882                PARAM_EXT_REQUEST_LIST_DATA::ID,
33883            ),
33884            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
33885            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
33886            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
33887            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
33888            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
33889            (
33890                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
33891                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
33892            ),
33893            (
33894                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
33895                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
33896            ),
33897            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
33898            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
33899            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
33900            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
33901            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
33902            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
33903            (
33904                ORBIT_EXECUTION_STATUS_DATA::NAME,
33905                ORBIT_EXECUTION_STATUS_DATA::ID,
33906            ),
33907            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
33908            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
33909            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
33910            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
33911            (
33912                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
33913                ACTUATOR_OUTPUT_STATUS_DATA::ID,
33914            ),
33915            (
33916                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33917                TIME_ESTIMATE_TO_TARGET_DATA::ID,
33918            ),
33919            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
33920            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
33921            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
33922            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
33923            (
33924                ONBOARD_COMPUTER_STATUS_DATA::NAME,
33925                ONBOARD_COMPUTER_STATUS_DATA::ID,
33926            ),
33927            (
33928                COMPONENT_INFORMATION_DATA::NAME,
33929                COMPONENT_INFORMATION_DATA::ID,
33930            ),
33931            (
33932                COMPONENT_INFORMATION_BASIC_DATA::NAME,
33933                COMPONENT_INFORMATION_BASIC_DATA::ID,
33934            ),
33935            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
33936            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
33937            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
33938            (EVENT_DATA::NAME, EVENT_DATA::ID),
33939            (
33940                CURRENT_EVENT_SEQUENCE_DATA::NAME,
33941                CURRENT_EVENT_SEQUENCE_DATA::ID,
33942            ),
33943            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
33944            (
33945                RESPONSE_EVENT_ERROR_DATA::NAME,
33946                RESPONSE_EVENT_ERROR_DATA::ID,
33947            ),
33948            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
33949            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
33950            (
33951                AVAILABLE_MODES_MONITOR_DATA::NAME,
33952                AVAILABLE_MODES_MONITOR_DATA::ID,
33953            ),
33954            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
33955            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
33956            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
33957            (
33958                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
33959                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
33960            ),
33961            (
33962                OPEN_DRONE_ID_LOCATION_DATA::NAME,
33963                OPEN_DRONE_ID_LOCATION_DATA::ID,
33964            ),
33965            (
33966                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
33967                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
33968            ),
33969            (
33970                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
33971                OPEN_DRONE_ID_SELF_ID_DATA::ID,
33972            ),
33973            (
33974                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
33975                OPEN_DRONE_ID_SYSTEM_DATA::ID,
33976            ),
33977            (
33978                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
33979                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
33980            ),
33981            (
33982                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
33983                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
33984            ),
33985            (
33986                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
33987                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
33988            ),
33989            (
33990                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
33991                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
33992            ),
33993            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
33994            (AVSS_PRS_SYS_STATUS_DATA::NAME, AVSS_PRS_SYS_STATUS_DATA::ID),
33995            (AVSS_DRONE_POSITION_DATA::NAME, AVSS_DRONE_POSITION_DATA::ID),
33996            (AVSS_DRONE_IMU_DATA::NAME, AVSS_DRONE_IMU_DATA::ID),
33997            (
33998                AVSS_DRONE_OPERATION_MODE_DATA::NAME,
33999                AVSS_DRONE_OPERATION_MODE_DATA::ID,
34000            ),
34001        ]
34002    }
34003}
34004impl Message for MavMessage {
34005    fn parse(
34006        version: MavlinkVersion,
34007        id: u32,
34008        payload: &[u8],
34009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34010        match id {
34011            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34012                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34013                    .map(Self::ACTUATOR_CONTROL_TARGET)
34014            }
34015            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34016                .map(Self::ACTUATOR_OUTPUT_STATUS),
34017            ADSB_VEHICLE_DATA::ID => {
34018                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34019            }
34020            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34021            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34022            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34023            ATTITUDE_QUATERNION_DATA::ID => {
34024                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34025            }
34026            ATTITUDE_QUATERNION_COV_DATA::ID => {
34027                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34028                    .map(Self::ATTITUDE_QUATERNION_COV)
34029            }
34030            ATTITUDE_TARGET_DATA::ID => {
34031                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34032            }
34033            ATT_POS_MOCAP_DATA::ID => {
34034                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34035            }
34036            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34037            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34038                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34039                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34040            }
34041            AUTOPILOT_VERSION_DATA::ID => {
34042                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34043            }
34044            AVAILABLE_MODES_DATA::ID => {
34045                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34046            }
34047            AVAILABLE_MODES_MONITOR_DATA::ID => {
34048                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34049                    .map(Self::AVAILABLE_MODES_MONITOR)
34050            }
34051            AVSS_DRONE_IMU_DATA::ID => {
34052                AVSS_DRONE_IMU_DATA::deser(version, payload).map(Self::AVSS_DRONE_IMU)
34053            }
34054            AVSS_DRONE_OPERATION_MODE_DATA::ID => {
34055                AVSS_DRONE_OPERATION_MODE_DATA::deser(version, payload)
34056                    .map(Self::AVSS_DRONE_OPERATION_MODE)
34057            }
34058            AVSS_DRONE_POSITION_DATA::ID => {
34059                AVSS_DRONE_POSITION_DATA::deser(version, payload).map(Self::AVSS_DRONE_POSITION)
34060            }
34061            AVSS_PRS_SYS_STATUS_DATA::ID => {
34062                AVSS_PRS_SYS_STATUS_DATA::deser(version, payload).map(Self::AVSS_PRS_SYS_STATUS)
34063            }
34064            BATTERY_INFO_DATA::ID => {
34065                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34066            }
34067            BATTERY_STATUS_DATA::ID => {
34068                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34069            }
34070            BUTTON_CHANGE_DATA::ID => {
34071                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34072            }
34073            CAMERA_CAPTURE_STATUS_DATA::ID => {
34074                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34075            }
34076            CAMERA_FOV_STATUS_DATA::ID => {
34077                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34078            }
34079            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34080                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34081            }
34082            CAMERA_INFORMATION_DATA::ID => {
34083                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34084            }
34085            CAMERA_SETTINGS_DATA::ID => {
34086                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34087            }
34088            CAMERA_THERMAL_RANGE_DATA::ID => {
34089                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34090            }
34091            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34092                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34093                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34094            }
34095            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34096                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34097                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34098            }
34099            CAMERA_TRIGGER_DATA::ID => {
34100                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34101            }
34102            CANFD_FRAME_DATA::ID => {
34103                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34104            }
34105            CAN_FILTER_MODIFY_DATA::ID => {
34106                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34107            }
34108            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34109            CELLULAR_CONFIG_DATA::ID => {
34110                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34111            }
34112            CELLULAR_STATUS_DATA::ID => {
34113                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34114            }
34115            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34116                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34117                    .map(Self::CHANGE_OPERATOR_CONTROL)
34118            }
34119            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34120                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34121                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34122            }
34123            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34124            COMMAND_ACK_DATA::ID => {
34125                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34126            }
34127            COMMAND_CANCEL_DATA::ID => {
34128                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34129            }
34130            COMMAND_INT_DATA::ID => {
34131                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34132            }
34133            COMMAND_LONG_DATA::ID => {
34134                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34135            }
34136            COMPONENT_INFORMATION_DATA::ID => {
34137                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34138            }
34139            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34140                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34141                    .map(Self::COMPONENT_INFORMATION_BASIC)
34142            }
34143            COMPONENT_METADATA_DATA::ID => {
34144                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34145            }
34146            CONTROL_SYSTEM_STATE_DATA::ID => {
34147                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34148            }
34149            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34150                .map(Self::CURRENT_EVENT_SEQUENCE),
34151            CURRENT_MODE_DATA::ID => {
34152                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34153            }
34154            DATA_STREAM_DATA::ID => {
34155                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34156            }
34157            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34158                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34159                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34160            }
34161            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34162            DEBUG_FLOAT_ARRAY_DATA::ID => {
34163                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34164            }
34165            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34166            DISTANCE_SENSOR_DATA::ID => {
34167                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34168            }
34169            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34170            ENCAPSULATED_DATA_DATA::ID => {
34171                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34172            }
34173            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34174            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34175            ESTIMATOR_STATUS_DATA::ID => {
34176                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34177            }
34178            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34179            EXTENDED_SYS_STATE_DATA::ID => {
34180                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34181            }
34182            FENCE_STATUS_DATA::ID => {
34183                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34184            }
34185            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34186                .map(Self::FILE_TRANSFER_PROTOCOL),
34187            FLIGHT_INFORMATION_DATA::ID => {
34188                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34189            }
34190            FOLLOW_TARGET_DATA::ID => {
34191                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34192            }
34193            FUEL_STATUS_DATA::ID => {
34194                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34195            }
34196            GENERATOR_STATUS_DATA::ID => {
34197                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34198            }
34199            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34200                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34201                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34202            }
34203            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34204                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34205                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34206            }
34207            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34208                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34209                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34210            }
34211            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34212                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34213                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34214            }
34215            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34216                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34217                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34218            }
34219            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34220                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34221                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34222            }
34223            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34224                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34225                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34226            }
34227            GIMBAL_MANAGER_STATUS_DATA::ID => {
34228                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34229            }
34230            GLOBAL_POSITION_INT_DATA::ID => {
34231                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34232            }
34233            GLOBAL_POSITION_INT_COV_DATA::ID => {
34234                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34235                    .map(Self::GLOBAL_POSITION_INT_COV)
34236            }
34237            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34238                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34239                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34240            }
34241            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34242            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34243            GPS_GLOBAL_ORIGIN_DATA::ID => {
34244                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34245            }
34246            GPS_INJECT_DATA_DATA::ID => {
34247                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34248            }
34249            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34250            GPS_RAW_INT_DATA::ID => {
34251                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34252            }
34253            GPS_RTCM_DATA_DATA::ID => {
34254                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34255            }
34256            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34257            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34258            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34259            HIGHRES_IMU_DATA::ID => {
34260                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34261            }
34262            HIGH_LATENCY_DATA::ID => {
34263                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34264            }
34265            HIGH_LATENCY2_DATA::ID => {
34266                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34267            }
34268            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34269                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34270            }
34271            HIL_CONTROLS_DATA::ID => {
34272                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34273            }
34274            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34275            HIL_OPTICAL_FLOW_DATA::ID => {
34276                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34277            }
34278            HIL_RC_INPUTS_RAW_DATA::ID => {
34279                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34280            }
34281            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34282            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34283            HIL_STATE_QUATERNION_DATA::ID => {
34284                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34285            }
34286            HOME_POSITION_DATA::ID => {
34287                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34288            }
34289            HYGROMETER_SENSOR_DATA::ID => {
34290                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34291            }
34292            ILLUMINATOR_STATUS_DATA::ID => {
34293                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34294            }
34295            ISBD_LINK_STATUS_DATA::ID => {
34296                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34297            }
34298            LANDING_TARGET_DATA::ID => {
34299                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34300            }
34301            LINK_NODE_STATUS_DATA::ID => {
34302                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34303            }
34304            LOCAL_POSITION_NED_DATA::ID => {
34305                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34306            }
34307            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34308                .map(Self::LOCAL_POSITION_NED_COV),
34309            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34310                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34311                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34312            }
34313            LOGGING_ACK_DATA::ID => {
34314                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34315            }
34316            LOGGING_DATA_DATA::ID => {
34317                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34318            }
34319            LOGGING_DATA_ACKED_DATA::ID => {
34320                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34321            }
34322            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34323            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34324            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34325            LOG_REQUEST_DATA_DATA::ID => {
34326                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34327            }
34328            LOG_REQUEST_END_DATA::ID => {
34329                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34330            }
34331            LOG_REQUEST_LIST_DATA::ID => {
34332                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34333            }
34334            MAG_CAL_REPORT_DATA::ID => {
34335                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34336            }
34337            MANUAL_CONTROL_DATA::ID => {
34338                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34339            }
34340            MANUAL_SETPOINT_DATA::ID => {
34341                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34342            }
34343            MEMORY_VECT_DATA::ID => {
34344                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34345            }
34346            MESSAGE_INTERVAL_DATA::ID => {
34347                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34348            }
34349            MISSION_ACK_DATA::ID => {
34350                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34351            }
34352            MISSION_CLEAR_ALL_DATA::ID => {
34353                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34354            }
34355            MISSION_COUNT_DATA::ID => {
34356                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34357            }
34358            MISSION_CURRENT_DATA::ID => {
34359                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34360            }
34361            MISSION_ITEM_DATA::ID => {
34362                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34363            }
34364            MISSION_ITEM_INT_DATA::ID => {
34365                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34366            }
34367            MISSION_ITEM_REACHED_DATA::ID => {
34368                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34369            }
34370            MISSION_REQUEST_DATA::ID => {
34371                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34372            }
34373            MISSION_REQUEST_INT_DATA::ID => {
34374                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34375            }
34376            MISSION_REQUEST_LIST_DATA::ID => {
34377                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34378            }
34379            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34380                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34381                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34382            }
34383            MISSION_SET_CURRENT_DATA::ID => {
34384                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34385            }
34386            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34387                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34388                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34389            }
34390            MOUNT_ORIENTATION_DATA::ID => {
34391                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34392            }
34393            NAMED_VALUE_FLOAT_DATA::ID => {
34394                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34395            }
34396            NAMED_VALUE_INT_DATA::ID => {
34397                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34398            }
34399            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34400                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34401            }
34402            OBSTACLE_DISTANCE_DATA::ID => {
34403                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34404            }
34405            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34406            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34407                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34408                    .map(Self::ONBOARD_COMPUTER_STATUS)
34409            }
34410            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34411                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34412                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34413            }
34414            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34415                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34416                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34417            }
34418            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34419                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34420            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34421                .map(Self::OPEN_DRONE_ID_LOCATION),
34422            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34423                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34424                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34425            }
34426            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34427                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34428                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34429            }
34430            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34431                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34432            }
34433            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34434                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34435            }
34436            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34437                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34438                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34439            }
34440            OPTICAL_FLOW_DATA::ID => {
34441                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34442            }
34443            OPTICAL_FLOW_RAD_DATA::ID => {
34444                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34445            }
34446            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34447                .map(Self::ORBIT_EXECUTION_STATUS),
34448            PARAM_EXT_ACK_DATA::ID => {
34449                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34450            }
34451            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34452                .map(Self::PARAM_EXT_REQUEST_LIST),
34453            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34454                .map(Self::PARAM_EXT_REQUEST_READ),
34455            PARAM_EXT_SET_DATA::ID => {
34456                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34457            }
34458            PARAM_EXT_VALUE_DATA::ID => {
34459                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34460            }
34461            PARAM_MAP_RC_DATA::ID => {
34462                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34463            }
34464            PARAM_REQUEST_LIST_DATA::ID => {
34465                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34466            }
34467            PARAM_REQUEST_READ_DATA::ID => {
34468                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34469            }
34470            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34471            PARAM_VALUE_DATA::ID => {
34472                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34473            }
34474            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34475            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34476            PLAY_TUNE_V2_DATA::ID => {
34477                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34478            }
34479            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34480                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34481                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34482            }
34483            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34484                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34485                    .map(Self::POSITION_TARGET_LOCAL_NED)
34486            }
34487            POWER_STATUS_DATA::ID => {
34488                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34489            }
34490            PROTOCOL_VERSION_DATA::ID => {
34491                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34492            }
34493            RADIO_STATUS_DATA::ID => {
34494                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34495            }
34496            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34497            RAW_PRESSURE_DATA::ID => {
34498                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34499            }
34500            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34501            RC_CHANNELS_DATA::ID => {
34502                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34503            }
34504            RC_CHANNELS_OVERRIDE_DATA::ID => {
34505                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34506            }
34507            RC_CHANNELS_RAW_DATA::ID => {
34508                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34509            }
34510            RC_CHANNELS_SCALED_DATA::ID => {
34511                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34512            }
34513            REQUEST_DATA_STREAM_DATA::ID => {
34514                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34515            }
34516            REQUEST_EVENT_DATA::ID => {
34517                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34518            }
34519            RESOURCE_REQUEST_DATA::ID => {
34520                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34521            }
34522            RESPONSE_EVENT_ERROR_DATA::ID => {
34523                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34524            }
34525            SAFETY_ALLOWED_AREA_DATA::ID => {
34526                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34527            }
34528            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34529                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34530                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34531            }
34532            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34533            SCALED_IMU2_DATA::ID => {
34534                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34535            }
34536            SCALED_IMU3_DATA::ID => {
34537                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34538            }
34539            SCALED_PRESSURE_DATA::ID => {
34540                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34541            }
34542            SCALED_PRESSURE2_DATA::ID => {
34543                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34544            }
34545            SCALED_PRESSURE3_DATA::ID => {
34546                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34547            }
34548            SERIAL_CONTROL_DATA::ID => {
34549                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34550            }
34551            SERVO_OUTPUT_RAW_DATA::ID => {
34552                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34553            }
34554            SETUP_SIGNING_DATA::ID => {
34555                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34556            }
34557            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34558                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34559                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34560            }
34561            SET_ATTITUDE_TARGET_DATA::ID => {
34562                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34563            }
34564            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34565                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34566            }
34567            SET_HOME_POSITION_DATA::ID => {
34568                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34569            }
34570            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34571            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34572                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34573                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34574            }
34575            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34576                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34577                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34578            }
34579            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34580            SMART_BATTERY_INFO_DATA::ID => {
34581                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34582            }
34583            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34584            STORAGE_INFORMATION_DATA::ID => {
34585                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34586            }
34587            SUPPORTED_TUNES_DATA::ID => {
34588                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34589            }
34590            SYSTEM_TIME_DATA::ID => {
34591                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34592            }
34593            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34594            TERRAIN_CHECK_DATA::ID => {
34595                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34596            }
34597            TERRAIN_DATA_DATA::ID => {
34598                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34599            }
34600            TERRAIN_REPORT_DATA::ID => {
34601                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34602            }
34603            TERRAIN_REQUEST_DATA::ID => {
34604                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34605            }
34606            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34607            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34608                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34609                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34610            }
34611            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34612                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34613                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34614            }
34615            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34616                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34617                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34618            }
34619            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34620            UAVCAN_NODE_INFO_DATA::ID => {
34621                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34622            }
34623            UAVCAN_NODE_STATUS_DATA::ID => {
34624                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34625            }
34626            UTM_GLOBAL_POSITION_DATA::ID => {
34627                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34628            }
34629            V2_EXTENSION_DATA::ID => {
34630                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34631            }
34632            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34633            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34634            VICON_POSITION_ESTIMATE_DATA::ID => {
34635                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34636                    .map(Self::VICON_POSITION_ESTIMATE)
34637            }
34638            VIDEO_STREAM_INFORMATION_DATA::ID => {
34639                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34640                    .map(Self::VIDEO_STREAM_INFORMATION)
34641            }
34642            VIDEO_STREAM_STATUS_DATA::ID => {
34643                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34644            }
34645            VISION_POSITION_ESTIMATE_DATA::ID => {
34646                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34647                    .map(Self::VISION_POSITION_ESTIMATE)
34648            }
34649            VISION_SPEED_ESTIMATE_DATA::ID => {
34650                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34651            }
34652            WHEEL_DISTANCE_DATA::ID => {
34653                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34654            }
34655            WIFI_CONFIG_AP_DATA::ID => {
34656                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34657            }
34658            WINCH_STATUS_DATA::ID => {
34659                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34660            }
34661            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34662            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34663        }
34664    }
34665    fn message_name(&self) -> &'static str {
34666        match self {
34667            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34668            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34669            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34670            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34671            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34672            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34673            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34674            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34675            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34676            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34677            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34678            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34679                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34680            }
34681            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34682            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34683            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34684            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::NAME,
34685            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::NAME,
34686            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::NAME,
34687            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::NAME,
34688            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34689            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34690            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34691            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34692            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34693            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34694            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34695            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34696            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34697            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34698            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34699            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34700            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34701            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34702            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34703            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34704            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34705            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34706            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34707            Self::COLLISION(..) => COLLISION_DATA::NAME,
34708            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34709            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34710            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34711            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34712            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34713            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34714            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34715            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34716            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34717            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34718            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34719            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34720            Self::DEBUG(..) => DEBUG_DATA::NAME,
34721            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34722            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34723            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34724            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34725            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34726            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34727            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34728            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34729            Self::EVENT(..) => EVENT_DATA::NAME,
34730            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34731            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34732            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34733            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34734            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34735            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34736            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34737            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34738            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34739            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34740            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34741            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34742            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34743                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34744            }
34745            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34746            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34747            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34748            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34749            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34750            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34751            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34752            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34753            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34754            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34755            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34756            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34757            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34758            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34759            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34760            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34761            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34762            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34763            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34764            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34765            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34766            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34767            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34768            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34769            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34770            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34771            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34772            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34773            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34774            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34775            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34776            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34777            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34778            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34779            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34780                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34781            }
34782            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34783            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34784            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34785            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34786            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34787            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34788            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34789            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34790            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34791            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34792            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34793            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34794            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34795            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34796            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34797            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34798            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34799            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34800            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34801            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34802            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34803            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34804            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34805            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34806            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34807            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34808            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34809            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34810            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34811            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34812            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34813            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34814            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34815            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34816            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34817            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34818            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34819            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34820            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34821            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34822            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34823            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34824            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34825            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34826            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34827            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34828            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34829            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34830            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34831            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34832            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34833            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34834            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34835            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34836            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34837            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34838            Self::PING(..) => PING_DATA::NAME,
34839            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34840            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34841            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34842            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34843            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34844            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34845            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34846            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34847            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34848            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34849            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34850            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34851            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34852            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34853            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34854            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34855            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34856            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34857            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34858            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34859            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34860            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34861            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34862            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34863            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34864            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34865            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34866            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34867            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34868            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34869            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34870            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34871            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34872            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34873            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34874            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34875            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34876            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34877            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34878            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34879            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34880            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34881            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34882            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34883            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34884            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34885            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34886            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34887            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34888            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34889                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34890            }
34891            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34892                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34893            }
34894            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34895            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34896            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34897            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34898            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34899            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34900            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34901            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34902            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34903            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34904            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34905            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34906            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34907            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34908            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34909            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34910        }
34911    }
34912    fn message_id(&self) -> u32 {
34913        match self {
34914            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34915            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34916            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34917            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34918            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34919            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34920            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34921            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34922            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34923            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34924            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34925            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34926                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34927            }
34928            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34929            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34930            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34931            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::ID,
34932            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::ID,
34933            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::ID,
34934            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::ID,
34935            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34936            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34937            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34938            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34939            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34940            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34941            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34942            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34943            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34944            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34945            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34946            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34947            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34948            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34949            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34950            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34951            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34952            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34953            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34954            Self::COLLISION(..) => COLLISION_DATA::ID,
34955            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34956            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34957            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34958            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34959            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34960            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34961            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34962            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34963            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34964            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34965            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34966            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34967            Self::DEBUG(..) => DEBUG_DATA::ID,
34968            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34969            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34970            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34971            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34972            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34973            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34974            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34975            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34976            Self::EVENT(..) => EVENT_DATA::ID,
34977            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34978            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34979            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34980            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34981            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34982            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34983            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34984            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34985            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34986            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34987            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34988            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34989            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34990                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34991            }
34992            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34993            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34994            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34995            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34996            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34997            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34998            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34999            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35000            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35001            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35002            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35003            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35004            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35005            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35006            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35007            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35008            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35009            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35010            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35011            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35012            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35013            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35014            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35015            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35016            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35017            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35018            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35019            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35020            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35021            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35022            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35023            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35024            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35025            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35026            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35027                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35028            }
35029            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35030            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35031            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35032            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35033            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35034            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35035            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35036            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35037            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35038            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35039            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35040            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35041            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35042            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35043            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35044            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35045            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35046            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35047            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35048            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35049            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35050            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35051            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35052            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35053            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35054            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35055            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35056            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35057            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35058            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35059            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35060            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35061            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35062            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35063            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35064            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35065            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35066            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35067            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35068            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35069            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35070            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35071            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35072            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35073            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35074            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35075            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35076            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35077            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35078            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35079            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35080            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35081            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35082            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35083            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35084            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35085            Self::PING(..) => PING_DATA::ID,
35086            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35087            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35088            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35089            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35090            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35091            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35092            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35093            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35094            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35095            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35096            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35097            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35098            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35099            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35100            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35101            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35102            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35103            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35104            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35105            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35106            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35107            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35108            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35109            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35110            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35111            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35112            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35113            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35114            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35115            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35116            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35117            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35118            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35119            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35120            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35121            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35122            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35123            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35124            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35125            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35126            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35127            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35128            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35129            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35130            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35131            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35132            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35133            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35134            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35135            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35136            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35137                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35138            }
35139            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35140            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35141            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35142            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35143            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35144            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35145            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35146            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35147            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35148            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35149            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35150            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35151            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35152            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35153            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35154            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35155        }
35156    }
35157    fn message_id_from_name(name: &str) -> Option<u32> {
35158        match name {
35159            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35160            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35161            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35162            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35163            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35164            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35165            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35166            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35167            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35168            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35169            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35170            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35171                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35172            }
35173            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35174            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35175            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35176            AVSS_DRONE_IMU_DATA::NAME => Some(AVSS_DRONE_IMU_DATA::ID),
35177            AVSS_DRONE_OPERATION_MODE_DATA::NAME => Some(AVSS_DRONE_OPERATION_MODE_DATA::ID),
35178            AVSS_DRONE_POSITION_DATA::NAME => Some(AVSS_DRONE_POSITION_DATA::ID),
35179            AVSS_PRS_SYS_STATUS_DATA::NAME => Some(AVSS_PRS_SYS_STATUS_DATA::ID),
35180            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35181            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35182            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35183            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35184            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35185            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35186            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35187            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35188            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35189            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35190            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35191            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35192            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35193            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35194            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35195            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35196            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35197            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35198            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35199            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35200            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35201            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35202            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35203            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35204            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35205            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35206            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35207            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35208            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35209            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35210            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35211            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35212            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35213            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35214            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35215            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35216            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35217            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35218            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35219            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35220            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35221            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35222            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35223            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35224            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35225            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35226            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35227            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35228            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35229            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35230                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35231            }
35232            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35233            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35234            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35235            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35236            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35237                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35238            }
35239            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35240            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35241            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35242            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35243            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35244                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35245            }
35246            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35247            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35248            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35249            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35250            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35251            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35252            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35253            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35254            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35255            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35256            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35257            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35258            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35259            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35260            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35261            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35262            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35263            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35264            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35265            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35266            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35267            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35268            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35269            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35270            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35271            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35272            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35273            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35274            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35275            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35276                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35277            }
35278            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35279            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35280            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35281            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35282            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35283            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35284            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35285            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35286            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35287            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35288            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35289            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35290            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35291            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35292            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35293            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35294            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35295            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35296            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35297            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35298            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35299            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35300            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35301            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35302            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35303            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35304            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35305            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35306            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35307            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35308            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35309            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35310            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35311            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35312            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35313            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35314            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35315            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35316            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35317            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35318            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35319            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35320            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35321            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35322            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35323            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35324            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35325            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35326            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35327            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35328            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35329            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35330            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35331            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35332            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35333            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35334            PING_DATA::NAME => Some(PING_DATA::ID),
35335            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35336            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35337            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35338            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35339            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35340            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35341            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35342            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35343            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35344            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35345            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35346            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35347            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35348            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35349            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35350            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35351            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35352            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35353            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35354            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35355            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35356            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35357            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35358            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35359            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35360            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35361            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35362            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35363            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35364            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35365            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35366            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35367            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35368            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35369            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35370                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35371            }
35372            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35373                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35374            }
35375            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35376            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35377            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35378            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35379            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35380            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35381            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35382            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35383            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35384            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35385            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35386            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35387            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35388            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35389                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35390            }
35391            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35392                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35393            }
35394            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35395            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35396            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35397            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35398            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35399            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35400            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35401            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35402            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35403            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35404            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35405            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35406            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35407            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35408            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35409            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35410            _ => None,
35411        }
35412    }
35413    fn default_message_from_id(id: u32) -> Option<Self> {
35414        match id {
35415            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35416                ACTUATOR_CONTROL_TARGET_DATA::default(),
35417            )),
35418            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35419                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35420            )),
35421            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35422            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35423            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35424            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35425            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35426                ATTITUDE_QUATERNION_DATA::default(),
35427            )),
35428            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35429                ATTITUDE_QUATERNION_COV_DATA::default(),
35430            )),
35431            ATTITUDE_TARGET_DATA::ID => {
35432                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35433            }
35434            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35435            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35436            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35437                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35438                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35439                ))
35440            }
35441            AUTOPILOT_VERSION_DATA::ID => {
35442                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35443            }
35444            AVAILABLE_MODES_DATA::ID => {
35445                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35446            }
35447            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35448                AVAILABLE_MODES_MONITOR_DATA::default(),
35449            )),
35450            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::default())),
35451            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
35452                AVSS_DRONE_OPERATION_MODE_DATA::default(),
35453            )),
35454            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
35455                AVSS_DRONE_POSITION_DATA::default(),
35456            )),
35457            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
35458                AVSS_PRS_SYS_STATUS_DATA::default(),
35459            )),
35460            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35461            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35462            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35463            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35464                CAMERA_CAPTURE_STATUS_DATA::default(),
35465            )),
35466            CAMERA_FOV_STATUS_DATA::ID => {
35467                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35468            }
35469            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35470                CAMERA_IMAGE_CAPTURED_DATA::default(),
35471            )),
35472            CAMERA_INFORMATION_DATA::ID => {
35473                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35474            }
35475            CAMERA_SETTINGS_DATA::ID => {
35476                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35477            }
35478            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35479                CAMERA_THERMAL_RANGE_DATA::default(),
35480            )),
35481            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35482                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35483            )),
35484            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35485                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35486            )),
35487            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35488            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35489            CAN_FILTER_MODIFY_DATA::ID => {
35490                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35491            }
35492            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35493            CELLULAR_CONFIG_DATA::ID => {
35494                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35495            }
35496            CELLULAR_STATUS_DATA::ID => {
35497                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35498            }
35499            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35500                CHANGE_OPERATOR_CONTROL_DATA::default(),
35501            )),
35502            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35503                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35504            )),
35505            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35506            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35507            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35508            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35509            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35510            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35511                COMPONENT_INFORMATION_DATA::default(),
35512            )),
35513            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35514                COMPONENT_INFORMATION_BASIC_DATA::default(),
35515            )),
35516            COMPONENT_METADATA_DATA::ID => {
35517                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35518            }
35519            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35520                CONTROL_SYSTEM_STATE_DATA::default(),
35521            )),
35522            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35523                CURRENT_EVENT_SEQUENCE_DATA::default(),
35524            )),
35525            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35526            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35527            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35528                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35529            )),
35530            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35531            DEBUG_FLOAT_ARRAY_DATA::ID => {
35532                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35533            }
35534            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35535            DISTANCE_SENSOR_DATA::ID => {
35536                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35537            }
35538            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35539            ENCAPSULATED_DATA_DATA::ID => {
35540                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35541            }
35542            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35543            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35544            ESTIMATOR_STATUS_DATA::ID => {
35545                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35546            }
35547            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35548            EXTENDED_SYS_STATE_DATA::ID => {
35549                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35550            }
35551            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35552            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35553                FILE_TRANSFER_PROTOCOL_DATA::default(),
35554            )),
35555            FLIGHT_INFORMATION_DATA::ID => {
35556                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35557            }
35558            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35559            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35560            GENERATOR_STATUS_DATA::ID => {
35561                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35562            }
35563            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35564                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35565            )),
35566            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35567                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35568            )),
35569            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35570                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35571            )),
35572            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35573                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35574            )),
35575            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35576                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35577            )),
35578            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35579                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35580                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35581                ))
35582            }
35583            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35584                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35585            )),
35586            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35587                GIMBAL_MANAGER_STATUS_DATA::default(),
35588            )),
35589            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35590                GLOBAL_POSITION_INT_DATA::default(),
35591            )),
35592            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35593                GLOBAL_POSITION_INT_COV_DATA::default(),
35594            )),
35595            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35596                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35597                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35598                ))
35599            }
35600            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35601            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35602            GPS_GLOBAL_ORIGIN_DATA::ID => {
35603                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35604            }
35605            GPS_INJECT_DATA_DATA::ID => {
35606                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35607            }
35608            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35609            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35610            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35611            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35612            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35613            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35614            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35615            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35616            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35617            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35618                HIL_ACTUATOR_CONTROLS_DATA::default(),
35619            )),
35620            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35621            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35622            HIL_OPTICAL_FLOW_DATA::ID => {
35623                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35624            }
35625            HIL_RC_INPUTS_RAW_DATA::ID => {
35626                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35627            }
35628            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35629            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35630            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35631                HIL_STATE_QUATERNION_DATA::default(),
35632            )),
35633            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35634            HYGROMETER_SENSOR_DATA::ID => {
35635                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35636            }
35637            ILLUMINATOR_STATUS_DATA::ID => {
35638                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35639            }
35640            ISBD_LINK_STATUS_DATA::ID => {
35641                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35642            }
35643            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35644            LINK_NODE_STATUS_DATA::ID => {
35645                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35646            }
35647            LOCAL_POSITION_NED_DATA::ID => {
35648                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35649            }
35650            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35651                LOCAL_POSITION_NED_COV_DATA::default(),
35652            )),
35653            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35654                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35655                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35656                ))
35657            }
35658            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35659            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35660            LOGGING_DATA_ACKED_DATA::ID => {
35661                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35662            }
35663            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35664            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35665            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35666            LOG_REQUEST_DATA_DATA::ID => {
35667                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35668            }
35669            LOG_REQUEST_END_DATA::ID => {
35670                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35671            }
35672            LOG_REQUEST_LIST_DATA::ID => {
35673                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35674            }
35675            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35676            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35677            MANUAL_SETPOINT_DATA::ID => {
35678                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35679            }
35680            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35681            MESSAGE_INTERVAL_DATA::ID => {
35682                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35683            }
35684            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35685            MISSION_CLEAR_ALL_DATA::ID => {
35686                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35687            }
35688            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35689            MISSION_CURRENT_DATA::ID => {
35690                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35691            }
35692            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35693            MISSION_ITEM_INT_DATA::ID => {
35694                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35695            }
35696            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35697                MISSION_ITEM_REACHED_DATA::default(),
35698            )),
35699            MISSION_REQUEST_DATA::ID => {
35700                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35701            }
35702            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35703                MISSION_REQUEST_INT_DATA::default(),
35704            )),
35705            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35706                MISSION_REQUEST_LIST_DATA::default(),
35707            )),
35708            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35709                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35710            )),
35711            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35712                MISSION_SET_CURRENT_DATA::default(),
35713            )),
35714            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35715                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35716            )),
35717            MOUNT_ORIENTATION_DATA::ID => {
35718                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35719            }
35720            NAMED_VALUE_FLOAT_DATA::ID => {
35721                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35722            }
35723            NAMED_VALUE_INT_DATA::ID => {
35724                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35725            }
35726            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35727                NAV_CONTROLLER_OUTPUT_DATA::default(),
35728            )),
35729            OBSTACLE_DISTANCE_DATA::ID => {
35730                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35731            }
35732            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35733            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35734                ONBOARD_COMPUTER_STATUS_DATA::default(),
35735            )),
35736            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35737                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35738            )),
35739            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35740                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35741            )),
35742            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35743                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35744            )),
35745            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35746                OPEN_DRONE_ID_LOCATION_DATA::default(),
35747            )),
35748            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35749                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35750            )),
35751            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35752                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35753            )),
35754            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35755                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35756            )),
35757            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35758                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35759            )),
35760            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35761                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35762            )),
35763            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35764            OPTICAL_FLOW_RAD_DATA::ID => {
35765                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35766            }
35767            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35768                ORBIT_EXECUTION_STATUS_DATA::default(),
35769            )),
35770            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35771            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35772                PARAM_EXT_REQUEST_LIST_DATA::default(),
35773            )),
35774            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35775                PARAM_EXT_REQUEST_READ_DATA::default(),
35776            )),
35777            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35778            PARAM_EXT_VALUE_DATA::ID => {
35779                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35780            }
35781            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35782            PARAM_REQUEST_LIST_DATA::ID => {
35783                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35784            }
35785            PARAM_REQUEST_READ_DATA::ID => {
35786                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35787            }
35788            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35789            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35790            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35791            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35792            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35793            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35794                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35795            )),
35796            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35797                POSITION_TARGET_LOCAL_NED_DATA::default(),
35798            )),
35799            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35800            PROTOCOL_VERSION_DATA::ID => {
35801                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35802            }
35803            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35804            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35805            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35806            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35807            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35808            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35809                RC_CHANNELS_OVERRIDE_DATA::default(),
35810            )),
35811            RC_CHANNELS_RAW_DATA::ID => {
35812                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35813            }
35814            RC_CHANNELS_SCALED_DATA::ID => {
35815                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35816            }
35817            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35818                REQUEST_DATA_STREAM_DATA::default(),
35819            )),
35820            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35821            RESOURCE_REQUEST_DATA::ID => {
35822                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35823            }
35824            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35825                RESPONSE_EVENT_ERROR_DATA::default(),
35826            )),
35827            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35828                SAFETY_ALLOWED_AREA_DATA::default(),
35829            )),
35830            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35831                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35832            )),
35833            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35834            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35835            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35836            SCALED_PRESSURE_DATA::ID => {
35837                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35838            }
35839            SCALED_PRESSURE2_DATA::ID => {
35840                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35841            }
35842            SCALED_PRESSURE3_DATA::ID => {
35843                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35844            }
35845            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35846            SERVO_OUTPUT_RAW_DATA::ID => {
35847                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35848            }
35849            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35850            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35851                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35852            )),
35853            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35854                SET_ATTITUDE_TARGET_DATA::default(),
35855            )),
35856            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35857                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35858            )),
35859            SET_HOME_POSITION_DATA::ID => {
35860                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35861            }
35862            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35863            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35864                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35865            )),
35866            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35867                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35868            )),
35869            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35870            SMART_BATTERY_INFO_DATA::ID => {
35871                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35872            }
35873            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35874            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35875                STORAGE_INFORMATION_DATA::default(),
35876            )),
35877            SUPPORTED_TUNES_DATA::ID => {
35878                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35879            }
35880            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35881            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35882            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35883            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35884            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35885            TERRAIN_REQUEST_DATA::ID => {
35886                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35887            }
35888            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35889            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35890                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35891            )),
35892            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35893                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35894                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35895                ))
35896            }
35897            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35898                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35899                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35900                ))
35901            }
35902            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35903            UAVCAN_NODE_INFO_DATA::ID => {
35904                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35905            }
35906            UAVCAN_NODE_STATUS_DATA::ID => {
35907                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35908            }
35909            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35910                UTM_GLOBAL_POSITION_DATA::default(),
35911            )),
35912            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35913            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35914            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35915            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35916                VICON_POSITION_ESTIMATE_DATA::default(),
35917            )),
35918            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35919                VIDEO_STREAM_INFORMATION_DATA::default(),
35920            )),
35921            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35922                VIDEO_STREAM_STATUS_DATA::default(),
35923            )),
35924            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35925                VISION_POSITION_ESTIMATE_DATA::default(),
35926            )),
35927            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35928                VISION_SPEED_ESTIMATE_DATA::default(),
35929            )),
35930            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35931            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35932            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35933            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35934            _ => None,
35935        }
35936    }
35937    #[cfg(feature = "arbitrary")]
35938    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35939        match id {
35940            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35941                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35942            )),
35943            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35944                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35945            )),
35946            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35947            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35948            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35949            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35950            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35951                ATTITUDE_QUATERNION_DATA::random(rng),
35952            )),
35953            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35954                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35955            )),
35956            ATTITUDE_TARGET_DATA::ID => {
35957                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35958            }
35959            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35960            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35961            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35962                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35963                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35964                ))
35965            }
35966            AUTOPILOT_VERSION_DATA::ID => {
35967                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35968            }
35969            AVAILABLE_MODES_DATA::ID => {
35970                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35971            }
35972            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35973                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35974            )),
35975            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::random(rng))),
35976            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
35977                AVSS_DRONE_OPERATION_MODE_DATA::random(rng),
35978            )),
35979            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
35980                AVSS_DRONE_POSITION_DATA::random(rng),
35981            )),
35982            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
35983                AVSS_PRS_SYS_STATUS_DATA::random(rng),
35984            )),
35985            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35986            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35987            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35988            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35989                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35990            )),
35991            CAMERA_FOV_STATUS_DATA::ID => {
35992                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35993            }
35994            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35995                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35996            )),
35997            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35998                CAMERA_INFORMATION_DATA::random(rng),
35999            )),
36000            CAMERA_SETTINGS_DATA::ID => {
36001                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36002            }
36003            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36004                CAMERA_THERMAL_RANGE_DATA::random(rng),
36005            )),
36006            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36007                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36008            )),
36009            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36010                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36011            )),
36012            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36013            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36014            CAN_FILTER_MODIFY_DATA::ID => {
36015                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36016            }
36017            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36018            CELLULAR_CONFIG_DATA::ID => {
36019                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36020            }
36021            CELLULAR_STATUS_DATA::ID => {
36022                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36023            }
36024            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36025                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36026            )),
36027            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36028                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36029            )),
36030            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36031            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36032            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36033            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36034            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36035            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36036                COMPONENT_INFORMATION_DATA::random(rng),
36037            )),
36038            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36039                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36040            )),
36041            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36042                COMPONENT_METADATA_DATA::random(rng),
36043            )),
36044            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36045                CONTROL_SYSTEM_STATE_DATA::random(rng),
36046            )),
36047            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36048                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36049            )),
36050            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36051            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36052            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36053                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36054            )),
36055            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36056            DEBUG_FLOAT_ARRAY_DATA::ID => {
36057                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36058            }
36059            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36060            DISTANCE_SENSOR_DATA::ID => {
36061                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36062            }
36063            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36064            ENCAPSULATED_DATA_DATA::ID => {
36065                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36066            }
36067            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36068            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36069            ESTIMATOR_STATUS_DATA::ID => {
36070                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36071            }
36072            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36073            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36074                EXTENDED_SYS_STATE_DATA::random(rng),
36075            )),
36076            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36077            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36078                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36079            )),
36080            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36081                FLIGHT_INFORMATION_DATA::random(rng),
36082            )),
36083            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36084            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36085            GENERATOR_STATUS_DATA::ID => {
36086                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36087            }
36088            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36089                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36090            )),
36091            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36092                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36093            )),
36094            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36095                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36096            )),
36097            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36098                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36099            )),
36100            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36101                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36102            )),
36103            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36104                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36105                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36106                ))
36107            }
36108            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36109                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36110            )),
36111            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36112                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36113            )),
36114            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36115                GLOBAL_POSITION_INT_DATA::random(rng),
36116            )),
36117            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36118                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36119            )),
36120            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36121                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36122                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36123                ))
36124            }
36125            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36126            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36127            GPS_GLOBAL_ORIGIN_DATA::ID => {
36128                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36129            }
36130            GPS_INJECT_DATA_DATA::ID => {
36131                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36132            }
36133            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36134            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36135            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36136            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36137            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36138            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36139            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36140            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36141            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36142            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36143                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36144            )),
36145            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36146            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36147            HIL_OPTICAL_FLOW_DATA::ID => {
36148                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36149            }
36150            HIL_RC_INPUTS_RAW_DATA::ID => {
36151                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36152            }
36153            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36154            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36155            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36156                HIL_STATE_QUATERNION_DATA::random(rng),
36157            )),
36158            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36159            HYGROMETER_SENSOR_DATA::ID => {
36160                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36161            }
36162            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36163                ILLUMINATOR_STATUS_DATA::random(rng),
36164            )),
36165            ISBD_LINK_STATUS_DATA::ID => {
36166                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36167            }
36168            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36169            LINK_NODE_STATUS_DATA::ID => {
36170                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36171            }
36172            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36173                LOCAL_POSITION_NED_DATA::random(rng),
36174            )),
36175            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36176                LOCAL_POSITION_NED_COV_DATA::random(rng),
36177            )),
36178            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36179                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36180                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36181                ))
36182            }
36183            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36184            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36185            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36186                LOGGING_DATA_ACKED_DATA::random(rng),
36187            )),
36188            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36189            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36190            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36191            LOG_REQUEST_DATA_DATA::ID => {
36192                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36193            }
36194            LOG_REQUEST_END_DATA::ID => {
36195                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36196            }
36197            LOG_REQUEST_LIST_DATA::ID => {
36198                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36199            }
36200            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36201            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36202            MANUAL_SETPOINT_DATA::ID => {
36203                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36204            }
36205            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36206            MESSAGE_INTERVAL_DATA::ID => {
36207                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36208            }
36209            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36210            MISSION_CLEAR_ALL_DATA::ID => {
36211                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36212            }
36213            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36214            MISSION_CURRENT_DATA::ID => {
36215                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36216            }
36217            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36218            MISSION_ITEM_INT_DATA::ID => {
36219                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36220            }
36221            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36222                MISSION_ITEM_REACHED_DATA::random(rng),
36223            )),
36224            MISSION_REQUEST_DATA::ID => {
36225                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36226            }
36227            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36228                MISSION_REQUEST_INT_DATA::random(rng),
36229            )),
36230            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36231                MISSION_REQUEST_LIST_DATA::random(rng),
36232            )),
36233            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36234                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36235            )),
36236            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36237                MISSION_SET_CURRENT_DATA::random(rng),
36238            )),
36239            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36240                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36241            )),
36242            MOUNT_ORIENTATION_DATA::ID => {
36243                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36244            }
36245            NAMED_VALUE_FLOAT_DATA::ID => {
36246                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36247            }
36248            NAMED_VALUE_INT_DATA::ID => {
36249                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36250            }
36251            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36252                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36253            )),
36254            OBSTACLE_DISTANCE_DATA::ID => {
36255                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36256            }
36257            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36258            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36259                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36260            )),
36261            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36262                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36263            )),
36264            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36265                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36266            )),
36267            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36268                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36269            )),
36270            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36271                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36272            )),
36273            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36274                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36275            )),
36276            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36277                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36278            )),
36279            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36280                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36281            )),
36282            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36283                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36284            )),
36285            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36286                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36287            )),
36288            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36289            OPTICAL_FLOW_RAD_DATA::ID => {
36290                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36291            }
36292            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36293                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36294            )),
36295            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36296            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36297                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36298            )),
36299            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36300                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36301            )),
36302            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36303            PARAM_EXT_VALUE_DATA::ID => {
36304                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36305            }
36306            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36307            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36308                PARAM_REQUEST_LIST_DATA::random(rng),
36309            )),
36310            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36311                PARAM_REQUEST_READ_DATA::random(rng),
36312            )),
36313            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36314            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36315            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36316            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36317            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36318            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36319                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36320            )),
36321            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36322                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36323            )),
36324            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36325            PROTOCOL_VERSION_DATA::ID => {
36326                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36327            }
36328            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36329            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36330            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36331            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36332            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36333            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36334                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36335            )),
36336            RC_CHANNELS_RAW_DATA::ID => {
36337                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36338            }
36339            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36340                RC_CHANNELS_SCALED_DATA::random(rng),
36341            )),
36342            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36343                REQUEST_DATA_STREAM_DATA::random(rng),
36344            )),
36345            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36346            RESOURCE_REQUEST_DATA::ID => {
36347                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36348            }
36349            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36350                RESPONSE_EVENT_ERROR_DATA::random(rng),
36351            )),
36352            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36353                SAFETY_ALLOWED_AREA_DATA::random(rng),
36354            )),
36355            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36356                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36357            )),
36358            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36359            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36360            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36361            SCALED_PRESSURE_DATA::ID => {
36362                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36363            }
36364            SCALED_PRESSURE2_DATA::ID => {
36365                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36366            }
36367            SCALED_PRESSURE3_DATA::ID => {
36368                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36369            }
36370            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36371            SERVO_OUTPUT_RAW_DATA::ID => {
36372                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36373            }
36374            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36375            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36376                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36377            )),
36378            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36379                SET_ATTITUDE_TARGET_DATA::random(rng),
36380            )),
36381            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36382                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36383            )),
36384            SET_HOME_POSITION_DATA::ID => {
36385                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36386            }
36387            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36388            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36389                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36390            )),
36391            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36392                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36393            )),
36394            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36395            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36396                SMART_BATTERY_INFO_DATA::random(rng),
36397            )),
36398            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36399            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36400                STORAGE_INFORMATION_DATA::random(rng),
36401            )),
36402            SUPPORTED_TUNES_DATA::ID => {
36403                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36404            }
36405            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36406            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36407            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36408            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36409            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36410            TERRAIN_REQUEST_DATA::ID => {
36411                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36412            }
36413            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36414            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36415                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36416            )),
36417            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36418                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36419                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36420                ))
36421            }
36422            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36423                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36424                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36425                ))
36426            }
36427            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36428            UAVCAN_NODE_INFO_DATA::ID => {
36429                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36430            }
36431            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36432                UAVCAN_NODE_STATUS_DATA::random(rng),
36433            )),
36434            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36435                UTM_GLOBAL_POSITION_DATA::random(rng),
36436            )),
36437            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36438            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36439            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36440            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36441                VICON_POSITION_ESTIMATE_DATA::random(rng),
36442            )),
36443            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36444                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36445            )),
36446            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36447                VIDEO_STREAM_STATUS_DATA::random(rng),
36448            )),
36449            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36450                VISION_POSITION_ESTIMATE_DATA::random(rng),
36451            )),
36452            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36453                VISION_SPEED_ESTIMATE_DATA::random(rng),
36454            )),
36455            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36456            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36457            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36458            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36459            _ => None,
36460        }
36461    }
36462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36463        match self {
36464            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36465            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36466            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36467            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36468            Self::ALTITUDE(body) => body.ser(version, bytes),
36469            Self::ATTITUDE(body) => body.ser(version, bytes),
36470            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36471            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36472            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36473            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36474            Self::AUTH_KEY(body) => body.ser(version, bytes),
36475            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36476            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36477            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36478            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36479            Self::AVSS_DRONE_IMU(body) => body.ser(version, bytes),
36480            Self::AVSS_DRONE_OPERATION_MODE(body) => body.ser(version, bytes),
36481            Self::AVSS_DRONE_POSITION(body) => body.ser(version, bytes),
36482            Self::AVSS_PRS_SYS_STATUS(body) => body.ser(version, bytes),
36483            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36484            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36485            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36486            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36487            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36488            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36489            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36490            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36491            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36492            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36493            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36494            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36495            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36496            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36497            Self::CAN_FRAME(body) => body.ser(version, bytes),
36498            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36499            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36500            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36501            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36502            Self::COLLISION(body) => body.ser(version, bytes),
36503            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36504            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36505            Self::COMMAND_INT(body) => body.ser(version, bytes),
36506            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36507            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36508            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36509            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36510            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36511            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36512            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36513            Self::DATA_STREAM(body) => body.ser(version, bytes),
36514            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36515            Self::DEBUG(body) => body.ser(version, bytes),
36516            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36517            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36518            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36519            Self::EFI_STATUS(body) => body.ser(version, bytes),
36520            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36521            Self::ESC_INFO(body) => body.ser(version, bytes),
36522            Self::ESC_STATUS(body) => body.ser(version, bytes),
36523            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36524            Self::EVENT(body) => body.ser(version, bytes),
36525            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36526            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36527            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36528            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36529            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36530            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36531            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36532            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36533            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36534            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36535            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36536            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36537            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36538            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36539            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36540            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36541            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36542            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36543            Self::GPS2_RAW(body) => body.ser(version, bytes),
36544            Self::GPS2_RTK(body) => body.ser(version, bytes),
36545            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36546            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36547            Self::GPS_INPUT(body) => body.ser(version, bytes),
36548            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36549            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36550            Self::GPS_RTK(body) => body.ser(version, bytes),
36551            Self::GPS_STATUS(body) => body.ser(version, bytes),
36552            Self::HEARTBEAT(body) => body.ser(version, bytes),
36553            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36554            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36555            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36556            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36557            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36558            Self::HIL_GPS(body) => body.ser(version, bytes),
36559            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36560            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36561            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36562            Self::HIL_STATE(body) => body.ser(version, bytes),
36563            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36564            Self::HOME_POSITION(body) => body.ser(version, bytes),
36565            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36566            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36567            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36568            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36569            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36570            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36571            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36572            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36573            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36574            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36575            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36576            Self::LOG_DATA(body) => body.ser(version, bytes),
36577            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36578            Self::LOG_ERASE(body) => body.ser(version, bytes),
36579            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36580            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36581            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36582            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36583            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36584            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36585            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36586            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36587            Self::MISSION_ACK(body) => body.ser(version, bytes),
36588            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36589            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36590            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36591            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36592            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36593            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36594            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36595            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36596            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36597            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36598            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36599            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36600            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36601            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36602            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36603            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36604            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36605            Self::ODOMETRY(body) => body.ser(version, bytes),
36606            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36607            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36608            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36609            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36610            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36611            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36612            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36613            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36614            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36615            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36616            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36617            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36618            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36619            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36620            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36621            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36622            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36623            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36624            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36625            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36626            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36627            Self::PARAM_SET(body) => body.ser(version, bytes),
36628            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36629            Self::PING(body) => body.ser(version, bytes),
36630            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36631            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36632            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36633            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36634            Self::POWER_STATUS(body) => body.ser(version, bytes),
36635            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36636            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36637            Self::RAW_IMU(body) => body.ser(version, bytes),
36638            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36639            Self::RAW_RPM(body) => body.ser(version, bytes),
36640            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36641            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36642            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36643            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36644            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36645            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36646            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36647            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36648            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36649            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36650            Self::SCALED_IMU(body) => body.ser(version, bytes),
36651            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36652            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36653            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36654            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36655            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36656            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36657            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36658            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36659            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36660            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36661            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36662            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36663            Self::SET_MODE(body) => body.ser(version, bytes),
36664            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36665            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36666            Self::SIM_STATE(body) => body.ser(version, bytes),
36667            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36668            Self::STATUSTEXT(body) => body.ser(version, bytes),
36669            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36670            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36671            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36672            Self::SYS_STATUS(body) => body.ser(version, bytes),
36673            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36674            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36675            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36676            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36677            Self::TIMESYNC(body) => body.ser(version, bytes),
36678            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36679            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36680            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36681            Self::TUNNEL(body) => body.ser(version, bytes),
36682            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36683            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36684            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36685            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36686            Self::VFR_HUD(body) => body.ser(version, bytes),
36687            Self::VIBRATION(body) => body.ser(version, bytes),
36688            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36689            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36690            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36691            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36692            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36693            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36694            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36695            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36696            Self::WIND_COV(body) => body.ser(version, bytes),
36697        }
36698    }
36699    fn extra_crc(id: u32) -> u8 {
36700        match id {
36701            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36702            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36703            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36704            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36705            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36706            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36707            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36708            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36709            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36710            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36711            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36712            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36713                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36714            }
36715            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36716            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36717            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36718            AVSS_DRONE_IMU_DATA::ID => AVSS_DRONE_IMU_DATA::EXTRA_CRC,
36719            AVSS_DRONE_OPERATION_MODE_DATA::ID => AVSS_DRONE_OPERATION_MODE_DATA::EXTRA_CRC,
36720            AVSS_DRONE_POSITION_DATA::ID => AVSS_DRONE_POSITION_DATA::EXTRA_CRC,
36721            AVSS_PRS_SYS_STATUS_DATA::ID => AVSS_PRS_SYS_STATUS_DATA::EXTRA_CRC,
36722            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36723            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36724            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36725            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36726            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36727            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36728            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36729            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36730            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36731            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36732            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36733            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36734            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36735            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36736            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36737            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36738            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36739            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36740            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36741            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36742            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36743            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36744            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36745            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36746            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36747            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36748            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36749            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36750            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36751            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36752            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36753            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36754            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36755            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36756            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36757            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36758            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36759            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36760            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36761            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36762            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36763            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36764            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36765            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36766            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36767            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36768            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36769            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36770            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36771            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36772            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36773            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36774            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36775            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36776            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36777                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36778            }
36779            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36780            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36781            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36782            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36783            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36784                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36785            }
36786            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36787            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36788            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36789            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36790            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36791            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36792            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36793            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36794            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36795            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36796            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36797            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36798            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36799            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36800            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36801            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36802            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36803            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36804            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36805            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36806            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36807            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36808            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36809            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36810            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36811            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36812            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36813            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36814            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36815            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36816                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36817            }
36818            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36819            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36820            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36821            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36822            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36823            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36824            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36825            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36826            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36827            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36828            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36829            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36830            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36831            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36832            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36833            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36834            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36835            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36836            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36837            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36838            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36839            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36840            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36841            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36842            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36843            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36844            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36845            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36846            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36847            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36848            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36849            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36850            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36851            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36852            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36853            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36854            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36855            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36856            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36857            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36858            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36859            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36860            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36861            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36862            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36863            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36864            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36865            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36866            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36867            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36868            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36869            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36870            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36871            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36872            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36873            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36874            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36875            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36876            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36877            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36878            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36879            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36880            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36881            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36882            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36883            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36884            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36885            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36886            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36887            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36888            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36889            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36890            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36891            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36892            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36893            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36894            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36895            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36896            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36897            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36898            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36899            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36900            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36901            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36902            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36903            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36904            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36905            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36906            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36907            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36908            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36909            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36910                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36911            }
36912            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36913            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36914            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36915            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36916            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36917            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36918            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36919            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36920            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36921            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36922            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36923            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36924            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36925            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36926            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36927                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36928            }
36929            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36930                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36931            }
36932            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36933            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36934            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36935            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36936            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36937            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36938            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36939            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36940            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36941            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36942            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36943            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36944            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36945            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36946            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36947            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36948            _ => 0,
36949        }
36950    }
36951    fn target_system_id(&self) -> Option<u8> {
36952        match self {
36953            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36954            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36955            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36956            Self::CAN_FRAME(inner) => Some(inner.target_system),
36957            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36958            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36959            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36960            Self::COMMAND_INT(inner) => Some(inner.target_system),
36961            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36962            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36963            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36964            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36965            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36966            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36967            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36968            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36969            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36970            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36971            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36972            Self::LOG_ERASE(inner) => Some(inner.target_system),
36973            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36974            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36975            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36976            Self::MISSION_ACK(inner) => Some(inner.target_system),
36977            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36978            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36979            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36980            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36981            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36982            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36983            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36984            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36985            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36986            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36987            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36988            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36989            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36990            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36991            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36992            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36993            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36994            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36995            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36996            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36997            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36998            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36999            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37000            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37001            Self::PARAM_SET(inner) => Some(inner.target_system),
37002            Self::PING(inner) => Some(inner.target_system),
37003            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37004            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37005            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37006            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37007            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37008            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37009            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37010            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37011            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37012            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37013            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37014            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37015            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37016            Self::SET_MODE(inner) => Some(inner.target_system),
37017            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37018            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37019            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37020            Self::TIMESYNC(inner) => Some(inner.target_system),
37021            Self::TUNNEL(inner) => Some(inner.target_system),
37022            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37023            _ => None,
37024        }
37025    }
37026    fn target_component_id(&self) -> Option<u8> {
37027        match self {
37028            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37029            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37030            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37031            Self::CAN_FRAME(inner) => Some(inner.target_component),
37032            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37033            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37034            Self::COMMAND_INT(inner) => Some(inner.target_component),
37035            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37036            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37037            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37038            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37039            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37040            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37041            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37042            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37043            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37044            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37045            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37046            Self::LOG_ERASE(inner) => Some(inner.target_component),
37047            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37048            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37049            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37050            Self::MISSION_ACK(inner) => Some(inner.target_component),
37051            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37052            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37053            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37054            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37055            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37056            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37057            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37058            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37059            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37060            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37061            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37062            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37063            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37064            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37065            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37066            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37067            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37068            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37069            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37070            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37071            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37072            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37073            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37074            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37075            Self::PARAM_SET(inner) => Some(inner.target_component),
37076            Self::PING(inner) => Some(inner.target_component),
37077            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37078            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37079            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37080            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37081            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37082            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37083            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37084            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37085            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37086            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37087            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37088            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37089            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37090            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37091            Self::TIMESYNC(inner) => Some(inner.target_component),
37092            Self::TUNNEL(inner) => Some(inner.target_component),
37093            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37094            _ => None,
37095        }
37096    }
37097}